Traversal rights

ABSTRACT

The present technology pertains to a organization directory hosted by a synchronized content management system. The corporate directory can provide access to user accounts for all members of the organization to all content items in the organization directory on the respective file systems of the members&#39; client devices. Members can reach any content item at the same path as other members relative to the organization directory root on their respective client device. In some embodiments novel access permissions are granted to maintain path consistency.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is a continuation of U.S. application Ser. No.15/857,784, filed on Dec. 29, 2017, entitled, TRAVERSAL RIGHTS, whichclaims the benefit of priority under U.S.C. § 119(e) to U.S. ProvisionalPatent Application 62/611,473, filed on Dec. 28, 2017, entitled,SYNCHRONIZED CONTENT MANAGEMENT SYSTEM, all of which are herebyexpressly incorporated herein by reference in their entireties.

TECHNICAL FIELD

The present technology pertains to providing a cloud based corporatedirectory, and more specifically pertains to cloud based corporatedirectory service that is synchronized amongst user devices and whichoffers private and shared collections.

BACKGROUND

Organizations have long utilized a space to store their data and contentitems. Before computers, content items went to repositories or filerooms. With the advent of networked computers, a shared network drivewas made accessible to members of the organization. In both paradigms,the overall goal was the same—to provide a location where all of anorganization's data could be stored and accessed by anyone withsufficient rights.

One modern storage paradigm utilizes a synchronized content managementsystem that offers services such as synchronizing copies of contentitems locally onto a client computer, sharing outside of anorganization, and more. However, the additional features offered by thesynchronized content management system create a great number oftechnical challenges to safely store all of an organization's contentitems while maintaining appropriate rights management.

BRIEF DESCRIPTION OF THE DRAWINGS

The above-recited and other advantages and features of the presenttechnology will become apparent by reference to specific implementationsillustrated in the appended drawings. A person of ordinary skill in theart will understand that these drawings only show some examples of thepresent technology and would not limit the scope of the presenttechnology to these examples. Furthermore, the skilled artisan willappreciate the principles of the present technology as described andexplained with additional specificity and detail through the use of theaccompanying drawings in which:

FIG. 1 shows an example of a content management system and clientdevices in accordance with some embodiments of the present technology;

FIG. 2 shows an example organization directory including organizationview and an member's view in accordance with some embodiments of thepresent technology;

FIG. 3 shows an example restrictive access control list in accordancewith some embodiments of the present technology;

FIG. 4 shows an example process to determine user account and clientdevice access authorizations in accordance with some embodiments of thepresent technology;

FIG. 5 shows an example file path including a confidential folder inaccordance with some embodiments of the present technology;

FIG. 6 shows an example mount table in accordance with some embodimentsof the present technology;

FIG. 7 shows an example system diagram of some aspects of a contentmanagement system in accordance with some embodiments of the presenttechnology;

FIG. 8A shows an example of communications processed by a file journalinterface between a client device and a server file journal on a contentmanagement system in accordance with some embodiments of the presenttechnology;

FIG. 8B shows an example process for translating communications betweena client device and a server file journal on a content management systemin accordance with some embodiments of the present technology;

FIG. 9A shows an example translation and linearization process fortranslating server file journal data to linearized operations inaccordance with some embodiments of the present technology;

FIG. 9B shows an example translation and linearization process fortranslating operations from a client device to revisions for a serverfile journal in accordance with some embodiments of the presenttechnology;

FIG. 10 shows an example linearization of cross-namespace operations inaccordance with some embodiments of the present technology;

FIG. 11A shows an example method for translating operations from aclient device to revisions for a server file journal on a contentmanagement system in accordance with some embodiments of the presenttechnology;

FIG. 11B shows an example method for translating revisions from a serverfile journal on a content management system to operations for a clientdevice in accordance with some embodiments of the present technology;

FIG. 12 shows an example of a client synchronization service inaccordance with some embodiments of the present technology;

FIG. 13 shows an example of tree data structures in accordance with someembodiments of the present technology;

FIG. 14 shows an example of tree data structures in accordance with someembodiments of the present technology;

FIG. 15 shows an example method for synchronizing a server state and afile system state using tree data structures in accordance with someembodiments of the present technology;

FIG. 16 shows an example method for resolving conflicts whensynchronizing a server state and a file system state using tree datastructures in accordance with some embodiments of the presenttechnology;

FIG. 17 shows an example of tree data structures illustrating aviolation of a rule for an add operation in accordance with someembodiments of the present technology;

FIG. 18 shows an example of a member's directory before and after anaccess change in accordance with some embodiments of the presenttechnology;

FIG. 19 shows an example method of determining whether traverse rightsor read-name-only rights should be granted to a user account for foldersin accordance with some embodiments of the present technology;

FIG. 20 shows an example table with possible access transitions inaccordance with some embodiments of the present technology;

FIG. 21A shows a directory before and after an access change inaccordance with some embodiments of the present technology;

FIG. 21B shows a directory before and after an access change inaccordance with some embodiments of the present technology;

FIG. 22 shows an example method for propagating access changes in adirectory tree in accordance with some embodiments of the presenttechnology;

FIG. 23 shows an example file system warnings system in accordance withsome embodiments of the present technology;

FIG. 24 shows an example method for determining whether to send a filesystem warning and for determining which warning to send in accordancewith some embodiments of the present technology;

FIG. 25 shows an example table of several file system warnings inaccordance with some embodiments of the present technology;

FIG. 26A, FIG. 26B, and FIG. 26C show an example file system warning inaccordance with some embodiments of the present technology;

FIG. 27 shows an example method of batching file system warnings inaccordance with some embodiments of the present technology;

FIG. 28 shows an example method for receiving and responding to a filesystem warnings application programming interface (API) call inaccordance with some embodiments of the present technology;

FIG. 29 shows an example method for determining where to place a fileshared with a user account in an organization in accordance with someembodiments of the present technology;

FIG. 30A, FIG. 30B, and FIG. 30C show example locations in which ashared content item could be stored in accordance with some embodimentsof the present technology;

FIG. 31 shows an example method for preventing loss of data orinadvertent sharing of a confidential content item in accordance withsome embodiments of the present technology;

FIG. 32A and FIG. 32B show example scenarios that could lead to loss ofdata or inadvertent sharing of a confidential content item in accordancewith some embodiments of the present technology;

FIG. 33 shows an example method for restoring access control listentries after deletion in accordance with some embodiments of thepresent technology;

FIG. 34 shows an example method for transitioning an existing useraccount into a organization directory in accordance with someembodiments of the present technology;

FIG. 35 shows an example transition from an existing user account intoan organization directory in accordance with some embodiments of thepresent technology;

FIG. 36 shows an example method of creating a namespace view inaccordance with some embodiments of the present technology;

FIG. 37 shows an example constructed namespace directory in accordancewith some embodiments of the present technology;

FIG. 38A, FIG. 38B, FIG. 38C, and FIG. 38D show example administratorconsole views in accordance with some embodiments of the presenttechnology; and

FIG. 39 shows an example of a system for implementing certain aspects ofthe present technology.

DETAILED DESCRIPTION

Various examples of the present technology are discussed in detailbelow. While specific implementations are discussed, it should beunderstood that this is done for illustration purposes only. A personskilled in the relevant art will recognize that other components andconfigurations may be used without parting from the spirit and scope ofthe present technology.

The disclosed technology addresses the need in the art for asynchronized content management system that provides an organizationcentric storage model. As will be addressed in more detail below, in thesynchronized content management system, collections and content itemsare synchronized between cloud storage and one or more client devices.Collections and content items stored on a client device are under themanagement of an operating system on the client device, and thus thesynchronized content management system has limited control over actionstaken on the client device. Furthermore, since multiple user accountswithin an organization can access and make changes to the samecollections and content items, this poses risks with respect tomaintaining correct access privileges to content items when accessrights to directories suddenly changed, or directories are moved ordeleted.

Additionally, it can be desirable within an organization-wide storagespace that anyone within an organization that has access to a particularcollection or content item has access to the data under the same filepath. This facilitates knowledge sharing by making it more simple todiscuss resources that might be available in the organization's storagespace. However, maintaining consistent file paths across theorganization can create access permission problems. For example, a humanresources department may have a collection that must have restrictedaccess, but the human resources department may also have a collectionthat can be shared outside of the human resources department. If thecollections were organized in the most logical way where all humanresources content items are in the same collection, this would requireeither very careful collection organization, or would require aninnovative data model and permissions management schema. The presenttechnology provides the later.

In some embodiments the disclosed technology is deployed in the contextof a content management system having content item synchronizationcapabilities and collaboration features, among others. An example systemconfiguration 100 is shown in FIG. 1 , which depicts content managementsystem 110 interacting with client device 150.

Accounts

Content management system 110 can store content items in associationwith accounts, as well as perform a variety of content item managementtasks, such as retrieve, modify, browse, and/or share the contentitem(s). Furthermore, content management system 110 can enable anaccount to access content item(s) from multiple client devices.

Content management system 110 supports a plurality of accounts. Anentity (user, group of users, team, company, etc.) can create an accountwith content management system, and account details can be stored inaccount database 140. Account database 140 can store profile informationfor registered entities. In some cases, profile information forregistered entities includes a username and/or email address. Accountdatabase 140 can include account management information, such as accounttype (e.g. various tiers of free or paid accounts), storage spaceallocated, storage space used, client devices 150 having a registeredcontent management client application 152 resident thereon, securitysettings, personal configuration settings, etc.

Account database 140 can store groups of accounts associated with anentity. Groups can have permissions based on group policies and/oraccess control lists, and members of the groups can inherit thepermissions. For example, a marketing group can have access to one setof content items while an engineering group can have access to anotherset of content items. An administrator group can modify groups, modifyuser accounts, etc.

Content Item Storage

A feature of content management system 110 is the storage of contentitems, which can be stored in content storage 142. Content items can beany digital data such as documents, collaboration content items, textfiles, audio files, image files, video files, webpages, executablefiles, binary files, etc. A content item can also include collections orother mechanisms for grouping content items together with differentbehaviors, such as folders, zip files, playlists, albums, etc. Acollection can refer to a folder, or a plurality of content items thatare related or grouped by a common attribute. In some embodiments,content storage 142 is combined with other types of storage or databasesto handle specific functions. Content storage 142 can store contentitems, while metadata regarding the content items can be stored inmetadata database 146. Likewise, data regarding where a content item isstored in content storage 142 can be stored in content directory 144.Additionally, data regarding changes, access, etc. can be stored inserver file journal 148. Each of the various storages/databases such ascontent storage 142, content directory 144, server file journal 148, andmetadata database 146 can be comprised of more than one such storage ordatabase and can be distributed over many devices and locations. Otherconfigurations are also possible. For example, data from content storage142, content directory 144, server file journal 148, and/or metadatadatabase 146 may be combined into one or more content storages ordatabases or further segmented into additional content storages ordatabases. Thus, content management system 110 may include more or lessstorages and/or databases than shown in FIG. 1 .

In some embodiments, content storage 142 is associated with at least onecontent storage service 116, which includes software or other processorexecutable instructions for managing the storage of content itemsincluding, but not limited to, receiving content items for storage,preparing content items for storage, selecting a storage location forthe content item, retrieving content items from storage, etc. In someembodiments, content storage service 116 can divide a content item intosmaller chunks for storage at content storage 142. The location of eachchunk making up a content item can be recorded in content directory 144.Content directory 144 can include a content entry for each content itemstored in content storage 142. The content entry can be associated witha unique ID, which identifies a content item.

In some embodiments, the unique ID, which identifies a content item incontent directory 144, can be derived from a deterministic hashfunction. This method of deriving a unique ID for a content item canensure that content item duplicates are recognized as such since thedeterministic hash function will output the same identifier for everycopy of the same content item, but will output a different identifierfor a different content item. Using this methodology, content storageservice 116 can output a unique ID for each content item.

Content storage service 116 can also designate or record a content pathfor a content item in metadata database 146. The content path caninclude the name of the content item and/or folder hierarchy associatedwith the content item. For example, the content path can include afolder or path of folders in which the content item is stored in a localfile system on a client device. While content items are stored incontent storage 142 in blocks and may not be stored under a tree likedirectory structure, such directory structure is a comfortablenavigation structure for users. Content storage service 116 can defineor record a content path for a content item wherein the “root” node of adirectory structure can be a namespace for each account. Within thenamespace can be a directory structure defined by a user of an accountand/or content storage service 116. Metadata database 146 can store thecontent path for each content item as part of a content entry.

In some embodiments the namespace can include additional namespacesnested in the directory structure as if they are stored within the rootnode. This can occur when an account has access to a shared collection.Shared collections can be assigned their own namespace within contentmanagement system 110. While some shared collections are actually a rootnode for the shared collection, they are located subordinate to theaccount namespace in the directory structure, and can appear as a folderwithin a folder for the account. As addressed above, the directorystructure is merely a comfortable navigation structure for users, butdoes not correlate to storage locations of content items in contentstorage 142.

While the directory structure in which an account views content itemsdoes not correlate to storage locations at content management system110, the directory structure can correlate to storage locations onclient device 150 depending on the file system used by client device150.

As addressed above, a content entry in content directory 144 can alsoinclude the location of each chunk making up a content item. Morespecifically, the content entry can include content pointers thatidentify the location in content storage 142 of the chunks that make upthe content item.

In addition to a content path and content pointer, a content entry incontent directory 144 can also include a user account identifier thatidentifies the user account that has access to the content item and/or agroup identifier that identifies a group with access to the content itemand/or a namespace to which the content entry belongs.

Content storage service 116 can decrease the amount of storage spacerequired by identifying duplicate content items or duplicate blocks thatmake up a content item or versions of a content item. Instead of storingmultiple copies, content storage 142 can store a single copy of thecontent item or block of the content item and content directory 144 caninclude a pointer or other mechanism to link the duplicates to thesingle copy.

Content storage service 116 can also store metadata describing contentitems, content item types, folders, file path, and/or the relationshipof content items to various accounts, collections, or groups in metadatadatabase 146, in association with the unique ID of the content item.

Content storage service 116 can also store a log of data regardingchanges, access, etc. in server file journal 148. Server file journal148 can include the unique ID of the content item and a description ofthe change or access action along with a time stamp or version numberand any other relevant data. Server file journal 148 can also includepointers to blocks affected by the change or content item access.Content storage service can provide the ability to undo operations, byusing a content item version control that tracks changes to contentitems, different versions of content items (including diverging versiontrees), and a change history that can be acquired from the server filejournal 148.

Content Item Synchronization

Another feature of content management system 110 is synchronization ofcontent items with at least one client device 150. Client device(s) cantake different forms and have different capabilities. For example,client device 150 ₁ is a computing device having a local file systemaccessible by multiple applications resident thereon. Client device 150₂ is a computing device wherein content items are only accessible to aspecific application or by permission given by the specific application,and the content items are typically stored either in an applicationspecific space or in the cloud. Client device 150 ₃ is any client deviceaccessing content management system 110 via a web browser and accessingcontent items via a web interface. While example client devices 150 ₁,150 ₂, and 150 ₃ are depicted in form factors such as a laptop, mobiledevice, or web browser, it should be understood that the descriptionsthereof are not limited to devices of these example form factors. Forexample a mobile device such as client 150 ₂ might have a local filesystem accessible by multiple applications resident thereon, or client150 ₂ might access content management system 110 via a web browser. Assuch, the form factor should not be considered limiting when consideringclient 150's capabilities. One or more functions described herein withrespect to client device 150 may or may not be available on every clientdevice depending on the specific capabilities of the device—the fileaccess model being one such capability.

In many embodiments, client devices are associated with an account ofcontent management system 110, but in some embodiments client devicescan access content using shared links and do not require an account.

As noted above, some client devices can access content management system110 using a web browser. However, client devices can also access contentmanagement system 110 using client application 152 stored and running onclient device 150. Client application 152 can include a clientsynchronization service 156.

Client synchronization service 156 can be in communication with serversynchronization service 112 to synchronize changes to content itemsbetween client device 150 and content management system 110.

Client device 150 can synchronize content with content management system110 via client synchronization service 156. The synchronization can beplatform agnostic. That is, content can be synchronized across multipleclient devices of varying type, capabilities, operating systems, etc.Client synchronization service 156 can synchronize any changes (new,deleted, modified, copied, or moved content items) to content items in adesignated location of a file system of client device 150.

Content items can be synchronized from client device 150 to contentmanagement system 110, and vice versa. In embodiments whereinsynchronization is from client device 150 to content management system110, a user can manipulate content items directly from the file systemof client device 150, while client synchronization service 156 canmonitor directory on client device 150 for changes to files within themonitored folders.

When client synchronization service 156 detects a write, move, copy, ordelete of content in a directory that it monitors, clientsynchronization service 156 can synchronize the changes to contentmanagement system service 116. In some embodiments, clientsynchronization service 156 can perform some functions of contentmanagement system service 116 including functions addressed above suchas dividing the content item into blocks, hashing the content item togenerate a unique identifier, etc. Client synchronization service 156can index content within client storage index 164 and save the result instorage index 164. Indexing can include storing paths plus a uniqueserver identifier, and a unique client identifier for each content item.In some embodiments, client synchronization service 156 learns theunique server identifier from server synchronization service 112, andlearns the unique client identifier from the operating system of clientdevice 150.

Client synchronization service 156 can use storage index 164 tofacilitate the synchronization of at least a portion of the contentwithin client storage with content associated with a user account oncontent management system 110. For example, client synchronizationservice 156 can compare storage index 164 with content management system110 and detect differences between content on client storage and contentassociated with a user account on content management system 110. Clientsynchronization service 156 can then attempt to reconcile differences byuploading, downloading, modifying, and deleting content on clientstorage as appropriate. Content storage service 116 can store thechanged or new block for the content item and update server file journal148, metadata database 146, content directory 144, content storage 142,account database 140, etc. as appropriate.

When synchronizing from content management system 110 to client device150, a mount, modification, addition, deletion, move of a content itemrecorded in server file journal 148 can trigger a notification to besent to client device 150 using notification service 117. When clientdevice 150 is informed of the change a request changes listed in serverfile journal 148 since the last synchronization point known to theclient device. When client device 150 determines that it is out ofsynchronization with content management system 110, clientsynchronization service 156 requests content item blocks including thechanges, and updates its local copy of the changed content items.

In some embodiments, storage index 164 stores tree data structureswherein one tree reflects the latest representation of a directoryaccording to server synchronization service 112, while another treereflects the latest representation of the directory according to clientsynchronization service 156. Client synchronization service can work toensure that the tree structures match by requesting data from serversynchronization service 112 or committing changes on client device 150to content management system 110.

Sometimes client device 150 might not have a network connectionavailable. In this scenario, client synchronization service 156 canmonitor the linked collection for content item changes and queue thosechanges for later synchronization to content management system 110 whena network connection is available. Similarly, a user can manually start,stop, pause, or resume synchronization with content management system110.

Client synchronization service 156 can synchronize all contentassociated with a particular user account on content management system110. Alternatively, client synchronization service 156 can selectivelysynchronize a portion of the content of the total content associatedwith the particular user account on content management system 110.Selectively synchronizing only a portion of the content can preservespace on client device 150 and save bandwidth.

In some embodiments, client synchronization service 156 selectivelystores a portion of the content associated with the particular useraccount and stores placeholder content items in client storage for theremainder portion of the content. For example, client synchronizationservice 156 can store a placeholder content item that has the samefilename, path, extension, metadata, of its respective complete contentitem on content management system 110, but lacking the data of thecomplete content item. The placeholder content item can be a few bytesor less in size while the respective complete content item might besignificantly larger. After client device 150 attempts to access thecontent item, client synchronization service 156 can retrieve the dataof the content item from content management system 110 and provide thecomplete content item to accessing client device 150. This approach canprovide significant space and bandwidth savings while still providingfull access to a user's content on content management system 110.

Collaboration Features

Another feature of content management system 110 is to facilitatecollaboration between users. Collaboration features include content itemsharing, commenting on content items, co-working on content items,instant messaging, providing presence and seen state informationregarding content items, etc.

Sharing

Content management system 110 can manage sharing content via sharingservice 128. Sharing content by providing a link to the content caninclude making the content item accessible from any computing device innetwork communication with content management system 110. However, insome embodiments a link can be associated with access restrictionsenforced by content management system 110 and access control list 145.Sharing content can also include linking content using sharing service128 to share content within content management system 110 with at leastone additional user account (in addition to the original user accountassociated with the content item) so that each user account has accessto the content item. The additional user account can gain access to thecontent by accepting the content, which will then be accessible througheither web interface service 124 or directly from within the directorystructure associated with their account on client device 150. Thesharing can be performed in a platform agnostic manner. That is, thecontent can be shared across multiple client devices 150 of varyingtype, capabilities, operating systems, etc. The content can also beshared across varying types of user accounts.

To share a content item within content management system 110 sharingservice 128 can add a user account identifier or multiple user accountidentifiers to a content entry in access control list database 145associated with the content item, thus granting the added user accountaccess to the content item. Sharing service 128 can also remove useraccount identifiers from a content entry to restrict a user account'saccess to the content item. Sharing service 128 can record content itemidentifiers, user account identifiers given access to a content item,and access levels in access control list database 145. For example, insome embodiments, user account identifiers associated with a singlecontent entry can specify different permissions for respective useraccount identifiers with respect to the associated content item.

To share content items outside of content management system 110, sharingservice 128 can generate a custom network address, such as a uniformresource locator (URL), which allows any web browser to access thecontent item or collection in content management system 110 without anyauthentication. To accomplish this, sharing service 128 can includecontent identification data in the generated URL, which can later beused to properly identify and return the requested content item. Forexample, sharing service 128 can include the account identifier and thecontent path or a content item identifying code in the generated URL.Upon selection of the URL, the content identification data included inthe URL can be transmitted to content management system 110, which canuse the received content identification data to identify the appropriatecontent item and return the content item.

In addition to generating the URL, sharing service 128 can also beconfigured to record in access control list database 145 that a URL tothe content item has been created. In some embodiments, the contententry associated with a content item can include a URL flag indicatingwhether a URL to the content item has been created. For example, the URLflag can be a Boolean value initially set to 0 or false to indicate thata URL to the content item has not been created. Sharing service 128 canchange the value of the flag to 1 or true after generating a URL to thecontent item.

In some embodiments, sharing service 128 can associate a set ofpermissions to a URL for a content item. For example, if a user attemptsto access the content item via the URL, sharing service 128 can providea limited set of permissions for the content item. Examples of limitedpermissions include restrictions that the user cannot download thecontent item, save the content item, copy the content item, modify thecontent item, etc. In some embodiments, limited permissions includerestrictions that only permit a content item to be accessed from with aspecified domain, i.e., from within a corporate network domain, or byaccounts associated with a specified domain, e.g., accounts associatedwith a company account (e.g., @acme.com).

In some embodiments, sharing service 128 can also be configured todeactivate a generated URL. For example, each content entry can alsoinclude a URL active flag indicating whether the content should bereturned in response to a request from the generated URL. For example,sharing service 128 can only return a content item requested by agenerated link if the URL active flag is set to 1 or true. Thus, accessto a content item for which a URL has been generated can be easilyrestricted by changing the value of the URL active flag. This allows auser to restrict access to the shared content item without having tomove the content item or delete the generated URL. Likewise, sharingservice 128 can reactivate the URL by again changing the value of theURL active flag to 1 or true. A user can thus easily restore access tothe content item without the need to generate a new URL.

In some embodiments, content management system 110 can designate a URLfor uploading a content item. For example, a first user with a useraccount can request such a URL, provide the URL to a contributing userand the contributing user can upload a content item to the first user'suser account using the URL.

Team Service

In some embodiments content management system 110 includes team service130. Team service 130 can provide functionality for creating andmanaging defined teams of user accounts. Teams can be created for anorganization, with sub-teams (e.g., business units, or project teams,etc.), and user accounts assigned to teams and sub-teams, or teams canbe created for any defined group of user accounts. Teams service 130 canprovide an organization directory which is a common shared space for theteam that can include private user account folders, and team-sharedfolders. Teams service can also provide a management interface for anadministrator to manage collections in organization directory andcontent items within team, and can manage user accounts that areassociated with the team.

Authorization Service

In some embodiments, content management system 110 includesauthorization service 132. Authorization service 132 ensures that a useraccount attempting to access a namespace has appropriate rights toaccess the namespace. Authorization service 132 can receive a token fromclient application 152 that follows a request to access a namespace andcan return the capabilities permitted to the user account. For useraccounts with multiple levels of access (e.g. a user account with userrights and administrator rights) authorization service 132 can alsorequire explicit privilege escalation to avoid unintentional actions byadministrators.

Presence and Seen State

In some embodiments, content management system can provide informationabout how users with which a content item is shared are interacting orhave interacted with the content item. In some embodiments, contentmanagement system 110 can report that a user with which a content itemis shared is currently viewing the content item. For example, clientcollaboration service 160 can notify notifications service 117 whenclient device 150 is accessing the content item. Notifications service117 can then notify all client devices of other users having access tothe same content item of the presence of the user of client device 150with respect to the content item.

In some embodiments, content management system 110 can report a historyof user interaction with a shared content item. Collaboration service126 can query data sources such as metadata database 146 and server filejournal 148 to determine that a user has saved the content item, that auser has yet to view the content item, etc., and disseminate this statusinformation using notification service 117 to other users so that theycan know who currently is or has viewed or modified the content item.

Collaboration service 126 can facilitate comments associated withcontent, even if a content item does not natively support commentingfunctionality. Such comments can be stored in metadata database 146.

Collaboration service 126 can originate and transmit notifications forusers. For example, a user can mention another user in a comment andcollaboration service 126 can send a notification to that user that hehas been mentioned in the comment. Various other content item events cantrigger notifications, including deleting a content item, sharing acontent item, etc.

Collaboration service 126 can provide a messaging platform whereby userscan send and receive instant messages, voice calls, emails, etc.

Collaboration Content Items

In some embodiments content management service can also includeCollaborative document service 134 which can provide an interactivecontent item collaboration platform whereby users can simultaneouslycreate collaboration content items, comment in the collaboration contentitems, and manage tasks within the collaboration content items.Collaboration content items can be files that users can create and editusing a collaboration content item editor, and can contain collaborationcontent item elements. Collaboration content item elements may include acollaboration content item identifier, one or more author identifiers,collaboration content item text, collaboration content item attributes,interaction information, comments, sharing users, etc. Collaborationcontent item elements can be stored as database entities, which allowsfor searching and retrieving the collaboration content items. Multipleusers may access, view, edit, and collaborate on collaboration contentitems at the same time or at different times. In some embodiments thiscan be managed by requiring two users access a content item through aweb interface and there they can work on the same copy of the contentitem at the same time.

Collaboration Companion Interface

In some embodiments client collaboration service 160 can provide anative application companion interface for the purpose of displayinginformation relevant to a content item being presented on client device150. In embodiments wherein a content item is accessed by a nativeapplication stored and executed on client device 150, where the contentitem is in a designated location of the file system of client device 150such that the content item is managed by content application 152, thenative application may not provide any native way to display the aboveaddressed collaboration data. In such embodiments, client collaborationservice 160 can detect that a user has opened a content item, and canprovide an overlay with additional information for the content item,such as collaboration data. For example, the additional information caninclude comments for the content item, status of the content item,activity of other users previously or currently viewing the contentitem. Such an overlay can warn a user that changes might be lost becauseanother user is currently editing the content item.

In some embodiments, one or more of the services or storages/databasesdiscussed above can be accessed using public or private applicationprogramming interfaces.

Certain software applications can access content storage 142 via an APIon behalf of a user. For example, a software package such as anapplication running on client device 150, can programmatically make APIcalls directly to content management system 110 when a user providesauthentication credentials, to read, write, create, delete, share, orotherwise manipulate content.

A user can view or manipulate content stored in a user account via a webinterface generated and served by web interface service 124. Forexample, the user can navigate in a web browser to a web addressprovided by content management system 110. Changes or updates to contentin the content storage 142 made through the web interface, such asuploading a new version of a content item, can be propagated back toother client devices associated with the user's account. For example,multiple client devices, each with their own client software, can beassociated with a single account and content items in the account can besynchronized between each of the multiple client devices.

Client device 150 can connect to content management system 110 on behalfof a user. A user can directly interact with client device 150, forexample when client device 150 is a desktop or laptop computer, phone,television, Internet-of-things device, etc. Alternatively oradditionally, client device 150 can act on behalf of the user withoutthe user having physical access to client device 150, for example whenclient device 150 is a server.

Some features of client device 150 are enabled by an applicationinstalled on client device 150. In some embodiments, the application caninclude a content management system specific component. For example, thecontent management system specific component can be a stand-aloneapplication 152, one or more application plug-ins, and/or a browserextension. However, the user can also interact with content managementsystem 110 via a third-party application, such as a web browser, thatresides on client device 150 and is configured to communicate withcontent management system 110. In various implementations, theclient-side application 152 can present a user interface (UI) for a userto interact with content management system 110. For example, the usercan interact with the content management system 110 via a file systemexplorer integrated with the file system or via a webpage displayedusing a web browser application.

In some embodiments, client application 152 can be configured to manageand synchronize content for more than one account of content managementsystem 110. In such embodiments client application 152 can remain loggedinto multiple accounts and provide normal services for the multipleaccounts. In some embodiments, each account can appear as folder in afile system, and all content items within that folder can besynchronized with content management system 110. In some embodiments,client application 152 can include a selector to choose one of themultiple accounts to be the primary account or default account.

While content management system 110 is presented with specificcomponents, it should be understood by one skilled in the art, that thearchitectural configuration of system 100 is simply one possibleconfiguration and that other configurations with more or fewercomponents are possible. Further, a service can have more or lessfunctionality, even including functionality described as being withanother service. Moreover, features described herein with respect to anembodiment can be combined with features described with respect toanother embodiment.

While system 100 is presented with specific components, it should beunderstood by one skilled in the art, that the architecturalconfiguration of system 100 is simply one possible configuration andthat other configurations with more or fewer components are possible.

Organization Directory Introduction

As introduced above, it is desirable to provide a common space to storeall of an organization's content item, but the many features desired inmodern storage systems can create a myriad of challenges. The presenttechnology solves such challenges.

FIG. 2 illustrates an organization directory 201 for an organization,Acme, as viewed by the organization in organization view 210, and asviewed by Member 1 in Member 1's View 212 displayed on client device 150of Member 1. Organization directory 201 includes user account folders202 specific to user accounts of the organization, and team-sharedfolders 204 that are all shared by every member at Acme except forfolders 206 and 208 which are confidential team-shared folders and withaccess limited to members of the finance team, and marketing team,respectfully. All members of Acme can see the existence of financeteam-shared folder 206, and marketing team-shared folder 208, but theymay not access the folder unless they are a member of the respectiveteam.

While each of the folders illustrated in FIG. 2 appear as a part oforganization directory 201 when viewed on client device 150, in someembodiments each folder can be considered its own namespace, where thefolders representing the namespaces have been mounted within otherfolders to give the appearance of a cohesive organization directory 201.While, in some embodiments, each of the folders illustrated in FIG. 2may be their own namespace and therefore in some ways a separate fromorganization directory, the folders such as user account folder 202, andteam folders 204 have particular behaviors, and attributes due to theirmembership in organization directory 201.

One benefit of this storage paradigm is that all content items relevantto the organization are under the management of the organization. Oftenmembers of organizations store content items that they are not sharingwith others on local storage of their client device. Storing contentitems locally on a client, such as client 150, can be more convenientbecause content items stored locally on client 150 are always available,even when client 150 is not connected to the Internet. Also, a user isgenerally not required to separately login to their file system toaccess content items locally on client device 150. And since the contentitems are locally stored, a user doesn't need to wait as long for acontent item to load. All of these reasons lead to members oforganizations often storing personal folders and content items outsideof cloud or network based storage systems. The present technologyeliminates all of these common barriers to storing personal folders andcontent items in a content management system under management of theorganization.

Another benefit of this storage paradigm is that every member of theorganization will access the same content item at the same path, evenwhen accessing the content item on his or her respective file system onhis or her respective client device 150. Each of team-shared folders 204illustrated in FIG. 2 will be mounted for each user account of theorganization in the same arrangement (i.e., have the same path from theroot).

Another benefit of this storage paradigm is that access rights tofolders can be more granular than in typical storage systems. Sincefolders can be their own namespaces, separate access permissions can beprovided to each folder on a per user account basis. In someembodiments, this can lead to non-conventional access rights, as will beexplained in more detail herein.

Another benefit of this storage paradigm is that it can account forchallenges inherent in shared content management systems where multipleuser accounts can make changes at the same time. Furthermore, thisstorage paradigm can account for challenges inherent in a synchronizedcontent management system wherein changes made on client device 150 needto be propagated to content management system 110 and other clientdevices 150 of other user accounts associated with the organization.Such changes can sometimes change access and/or permissions for otheruser accounts that can create risks for content loss or content leakingas will be explained in more detail herein.

FIG. 2 also illustrates a comparison between organization view 210 oforganization directory 201 and member view 212 of organization directory201. Organization view 210 includes user account folders 202 for eachmember of the organization as well as team-shared folders 204. However,member view 212, which provides a view from the perspective of the useraccount of Member 1, includes only user account folder 215 for Member 1,and team-shared folders 204, which are visible to all members of theorganization.

As will be addressed in greater detail below, team service 130 providesa variety of access levels including (from least access to greatestaccess): no access (user account can't access or see a folder);view-name-only (allows a user account to view the existence of afolder), traversal (allows a user account to view the existence of thefolder, and open the folder, but does not allow the user account to seeany folder(s) or content item(s) within the folder other than aspecified folder(s) or content item(s)); read access (can view and open,but cannot change any content item or write to the folder); write access(can modify the folder or content item); and owner access (canwrite+modify membership to the folder/namespace). In some cases, theseaccess levels can be used by content management system 110 to determinethat a folder (such as those of Member 2, and Member 3) should not besynchronized with client device 150. In such cases, client device 150for user account of Member 1 is not aware of the existence of useraccount folder 216 for Member 2 and user account folder 217 for Member3.

Further Member 1's view 212 also differs from organization view 210 withrespect to confidential team-shared folders 206 and 208. Team-sharedfolder 1 219 is a confidential folder. The existence of team-sharedfolders 206 and 208 can still be seen by members of the organizationthat don't have access to the folders, but members of the organizationthat don't have access to the folders generally can't view the contentitems of the folder. Specifically, confidential team-shared folder 206includes content items 223 and confidential team-shared folder 208includes content items 225—neither content items 223 nor content items225 are accessible to user account of Member 1, and are not shown inMember 1's view 212.

In some embodiments, the user account of Member 1 may still be able tosee a specific folder or content item within a confidential folder thatthe user account does not otherwise have access to—the user account hastraversal rights to the confidential folder. For example, Member 1'sview 212 does include folder 221 that is subordinate to confidentialteam-shared folder 208. In this instance, and as will be explained ingreater detail below, the user account of Member 1 has be added to theaccess control list for folder 221. While the user account of Member 1still does not have permissions to view the contents of confidentialteam-shared folder 208 in general, the user account of Member 1 has beengiven specific permission to access folder 221. To account for the useraccount of Member 1's general lack of access to confidential team-sharedfolder 208, and the user account of Member 1's specific access to folder221, the user account of Member 1 is granted traversal access toconfidential team-shared folder 208—Member 1 can see and navigatethrough confidential team-shared folder 208, but does not have generalaccess to content items in confidential team-shared folder 208, andMember 1 cannot see any folders or content items in confidentialteam-shared folder 208 other than folder 221 to which Member 1 has beengranted explicit access.

Data Model

The present technology introduces a data model that is effective toprovide the benefits addressed above and throughout this description.The data model accounts for the integration of a plurality of useraccount folders, and team-shared folders into an organization directoryby combining functionality provided by namespaces, access control lists,filters, and authentications.

The organization directory is its own namespace (organization namespace)and is a root level for the organization directory and the root levelfor all user accounts for members of the organization. All of theteam-shared folders (namespaces themselves) and content items within theteam-shared folders are displayed within the organization directory, andare viewable at the same path(s) (relative to the root of the namespace)by all members of the organization subject to access rights. Anadministrator controls access privileges for the organization directoryand manages the organization directory and team-shared folders.

As indicated above, each of the plurality of user account folders arealso their own namespaces, which are the root level for each respectiveuser account's folder, but are mounted within the organization directory(e.g., user account folder 215 for Member 1 is mounted with organizationdirectory 201). A user account namespace is a folder containing contentitems that are personal content items (in the context of the useraccount's membership in the organization) for the user account. Thesecontent items are not generally shared with any other members of theorganization, but sharing of sub-folders and content items can occurthrough explicit action by the user account to select another useraccount with which to share or by sending a link to the content item toanother user account. The respective user account for the user accountfolder generally has rights to manage the user account folder and itscontents. However, the user account folder can still also be undercontrol of the administrator of the organization, wherein theadministrator can be responsible for creating the user account folder,and can access the user account folder in some instances.

In some embodiments, each of the team-shared folders such as team-sharedfolders 204 can also be their own namespaces. Each of team-sharedfolders can be associated with attributes such that they areautomatically mounted for all user accounts of the organization, andthey cannot be unmounted (except by an administrator).

Restrictive Access Control List

By default user accounts associated with an organization have at leastread access to team-shared folders 204 mounted within organizationdirectory 201. For team-shared folders 204 with this default behaviorthere is no need to list explicit permissions for the user accountsassociated with the organization in an access control list as thepermissions are implied through the default behavior.

However, some team-shared folders 204, such as finance folder 206 andmarketing folder 208 can be deemed “confidential” wherein the defaultbehavior for a team-shared folder is not observed. Access to suchconfidential folders is through explicit permissions recorded inrestrictive access control list 147. Restrictive access control list 147functions inversely from conventional access control list 145.Conventional access control list 145 is used to grant access tospecified individuals that would not otherwise have access. However,restrictive access control list 147 restricts all users that wouldotherwise have access from access unless they are excluded from therestriction by being listed in restrictive access control list 147. Forexample, the design folder has the default behavior for team-sharedfolders 204, and allows at least read access all user accounts, andtherefore there would be no entry for the member handbook folder inrestrictive access control list 147. However, finance folder 206 ismarked confidential, and therefore it is entered into restrictive accesscontrol list 147. By virtue of its inclusion in restrictive accesscontrol list, only user accounts or teams listed restrictive accesscontrol list 147 have at least read access to finance folder 206 and allother user accounts to not have at least read access.

In some embodiments restrictive access control list 147 can be storedwith, or as part of access control list 145, however, in suchembodiments entries can be marked as restricted, or the restrictivenature of the entries can be determined from a namespace identifier. Forclarity, throughout this description, reference to access control liststhat do not specify access control list 145 or restrictive accesscontrol list 147 refer to either or both types of access control list.

FIG. 3 illustrates restrictive access control list 147. In someembodiments, restrictive access control list 147 can record entitieshaving access on a namespace/folder basis. As illustrated, restrictiveaccess control list 147 can include reference to specific teams (e.g.,marketing) or specific user accounts having specified rights. Forexample, restrictive access control list 147 includes entry 241 formarketing folder 208 and can identify marketing team as having “writeaccess” without individually listing each member of the marketing team.This provides the advantage that as members come onto the marketingteam, or leave the marketing team, restrictive access control list 147for marketing folder 208 does not need to be modified. Instead membersthat come onto the marketing team, or leave the marketing team need onlybe added to or removed from the marketing team definition.

Restrictive access control list 147 also includes entry 243 for folder221 that identifies folder 221 as providing “write access” to themarketing team and “read access” to Member 1.

Entries 245 and 246 are illustrated outside of the table since they arenot included in restrictive access control list 147, and are included inFIG. 3 for the purposes of explanation. In some embodiments, namespacesand folders that allow the default access model are not included inrestrictive access control list 147 since these are not restrictivepermissions. For example entry 245 pertains to the design folder thatpermits all user accounts associated with organization directory 201 tohave write access to this namespace. Since there are no restrictions onaccess from the default access, entry 245 is not needed in restrictiveaccess control list 147 and appears outside the table. Entry 246 is alsonot needed in restrictive access control list and appears outsiderestrictive access control list 147. While access to folder 223 isrestricted by virtue of being a child folder under finance folder 206,access rights to folder 223 are inherited from finance folder 206, andare implied by the existence of folder 223 in the namespace of financefolder 206. Since there are no explicit access changes for folder 223 itdoes not need to be listed in restrictive access control list 147.

Restrictive access control list 147 can also be used to illustrate whena folder is its own namespace and when it is nested within anothernamespace. As illustrated in FIG. 3 , all team-shared folders have aunique ns_id (namespace ID). Design folder in entry 245 has a ns_id=9,marketing folder 208 in entry 241 has a ns_id=2, finance folder 206 inentry 244 has a ns_id=3. Each team-shared folder typically has differentaccess rights from organization directory 201, and therefore they arenamespaces. Namespaces are used to define a new access model from aparent folder. Accordingly, folder 221 is also considered a namespacehaving a ns_id=4, while folder 223 is not considered a namespace becauseit has the same access rights as its parent. In entry 246 folder 223lists its membership in ns_id=3 which is the ns_id for finance folder206. Folder 223 has a dir_id=101 (directory ID). In some embodiments,the folder names are not listed in restrictive access control list 147(or in access control list 145)—instead folders can be identified bytheir ns_id or dir_id.

In some embodiments user account folders can appear in restrictiveaccess control list 147. Entry 240 is for folder “Member 1” which isMember 1's user account folder and has its access restricted to onlyMember 1.

View-Name-Only Rights

As noted above, all user accounts having access to organizationdirectory 201 have at least sufficient access to view the existence offinance folder 206, but if they are not members of the finance team,they may not have any greater access. Such access is termedview-name-only access. Such access limits a user account, such as useraccount of Member 1, to view the existence of the folder, but theycannot open the folder (and therefore, they cannot read any contentswithin it), and they cannot write to the folder. Note thatview-name-only access is not explicitly recorded in restrictive accesscontrol list 147. Rather, this form of access can be determined at runtime (on demand) by determining that finance folder 206 is aconfidential folder and that a user account is not listed in restrictiveaccess control list 147 either explicitly by naming the user account orthrough membership in the finance group.

Traversal Rights

As noted above Member 1 has ‘traversal rights” to marketing folder 208.This means that Member 1 can open marketing folder 208 solely for thepurpose of traversing through marketing folder 208 to arrive at folder221 to which Member 1 has explicit “read” access. Traversal rights arean access class that is required by the general rule pertaining toorganizational directories that all user accounts should access contentitems by the same path in organization directory 201. This general rulethat all user accounts should access content items in organizationdirectory 201 by the same path conflicts with the confidential attributeof marketing folder 208 so a special type of access is needed—traversalrights.

Just as with view-name-only rights described above, traversal rights arealso not explicitly recorded in restrictive access control list.Traversal rights can be determined at run time by determining that auser account has read access or greater to a namespace that issubordinate to a confidential namespace that the user account does nothave access to.

Authorization Service and Auth Tokens

One challenge introduced by the general rule that all organizationcontent can be viewed by any user account having access to organizationdirectory 201 is that all user accounts are accessing the sameorganization directory, but each user account can potentially have adifferent view (or access rights) to folders in organization directory201 depending on their method of access, role, or viewing context.

Further, a given user account can have different views or access rightsdepending on whether a user account is associated with different accesslevels. An administrator, for example, can access organization directory201 as a user, or elevate their privileges to access organizationdirectory 201 as an administrator, owner, or as another user. Each rolewill provide different access rights.

Given the complexity of access, and non-traditional privileges such astraversal rights and view-name-only, traditional access based systemsare insufficient. Traditional access based systems typically record anaccess type for given user account for a specific content item ordirectory in an access control list, but such systems cannot handle theadditional complexities of elevated privileges, or unions of a useraccount and membership of a team, etc.

Accordingly, the present technology utilizes file system authorizationservice 132 in combination with restrictive access control list 147.Authorization service 132 ensures that a user account attempting toaccess a namespace has appropriate rights to access the namespace.Authorization service 132 can receive a token from client application152 that follows a request to access a namespace and can return thecapabilities permitted to the user account. For user accounts withmultiple levels of access (e.g. a user account with user rights andadministrator rights) authorization service 132 can also requireexplicit privilege escalation to avoid unintentional actions byadministrators.

As addressed in more detail below, in some embodiments authorizationservice 132 is called every time data is requested from contentmanagement system 101, or a request to write to content managementsystem 110 is received. In some embodiments, authorization service 132is called whenever a user account attempts to access a namespace for afirst time on any specific client device 150, or the user accountattempts to access a namespace after changing its role (e.g. user rightsto administrator rights, etc.). In such embodiments, after initiallyconfirming access to a namespace, a user account's rights to access thenamespace can persist until access permissions to the namespace change,or the user changes roles, etc.

FIG. 4 illustrates an example method for utilizing authorization service132 to determine access privileges. Client device 150 requests (302)access to a folder from server file journal 148 and includes an Authtoken with the request. The Auth token will specify a user account ID,an organization directory ID, and a view context. The view contextspecifies how client device 150 is viewing member organization directory201, (e.g., viewing in the file system of client device 150, viewing apreview via web browser, downloading via web browser, viewing as anadministrator in a content manager tool, mobile application, via API,etc.

As shown in FIG. 4 authorization service 132 receives a request (304)from client device 150. In some embodiments the request (302) fromclient device 150 asks for access for an entire organization directory,while in some embodiments, the request (302) may request access for aspecific namespace. When the request is pertinent to an entireorganization directory, authorization service 132 can query a mounttable (described in more detail in FIG. 6 ) for a list of namespaces inthe organization directory. Since organization directory 201 also maycontain a large number of member folders that are private to eachmember, the mount table can filter the mounts for a namespace by a useraccount ID so as to exclude any member folders that are not the useraccount folder of the user account ID provided in the Auth token. Thepertinent namespaces within the organization directory and their pathscan be returned to the authorization service to proceed at step 308.

When the request is for a specific namespace, authorization service 132can determine (306) a path for the namespace of the folder specified inclient request (302) by looking up the namespace path in the mounttable.

For each namespace in the path received from mount table followingeither action 305 or action 306, authorization service 132 can look up(308) namespace IDs (ns_id) in restrictive access control list 147, andcan determine (310) if any namespaces in the path are confidential.

If none of the namespaces in the path appear in restrictive accesscontrol list 147 this means that the user account can at least read(312) the folder to which it has requested (302) access. Since none ofthe namespaces in the path appear in restrictive access control list147, the requested folder must inherit properties from team-sharedfolder 204, which by default provides at least read access to all useraccounts authorized to view organization directory 201.

If any namespaces in the path are listed in restrictive access controllist 147 this means that the namespaces are confidential namespaces. Asaddressed above, confidential namespaces do not inherit accessproperties from parent namespaces, and the user account will not haveany access to a folder that is subordinate in the path to theconfidential namespace unless the user account was given explicitpermission to access a folder in the path either by the user accountappearing explicitly in restrictive access control list 147 or throughmembership to a team having explicit access. Accordingly, authorizationservice 132 determines whether the user account (or a team including theuser account) is listed in restrictive access control list 147 for theclosest superordinate confidential namespace appearing in the path. Ifthe user account (or a team including the user account) is listed inrestrictive access control list 147 for the closest superordinateconfidential namespace appearing in the path then authorization service132 determines that the user account can at least read (312) from serverfile journal 148.

The reason authorization service 132 only needs to check the closestsuperordinate confidential namespace in the path is illustrated in FIG.5 . FIG. 5 illustrates a path “/root/bar/foo/baz/destination” where“destination” folder 358 is the folder to which the user account hasrequested access. As illustrated in FIG. 5 user account has access tofolder “/foo” 354 because the user account appears in restrictive accesscontrol list 147. However, the path also includes folder “/baz” 356,another confidential folder, where the user account does not appear inrestrictive access control list 147, and thus does not have access to“/baz” 356. Since the user account does not have access to “/baz” 356,the user account also does not have access to “/destination” 358 eventhough user account does have access to “/foo” 354.

When authorization service 132 has determined that there are namespacesin the path that are confidential (310) and that user account is notlisted (314) in restrictive access control list 147 for the closestsuperordinate confidential namespace, it may be possible that useraccount has at least partial access to folder to which the user accounthas requested (302) access. This can be determined by authorizationservice 132 checking a traversal dictionary in metadata database 146.The traversal dictionary connects a namespace to a user account, andalso includes a list of traversal paths that the user can see withinthat namespace.

If the traversal dictionary includes an entry listing the user accountas having traversal access to the namespace including the folder towhich the user account has requested (302) access, and if the folder islisted within the list of traversal paths that the user can see withinthe namespace, then the user account has traversal access (318) to thefolder to which the user account has requested (302) access.

If the traversal dictionary does not indicate that the user account hastraversal rights to access the folder to which the user account hasrequested (302) access, authorization service 132 can determine (320)whether the folder to which the user account has requested (302) accessis a team-shared folder. If it is a team-shared folder, then all useraccounts associated with organization directory 201 have rights to atleast view the name of all team-shared folders, and the user account hasview-name-only access to the folder to which the user account hasrequested (302) access.

If the folder to which the user account has requested (302) access isnot a team-shared folder, then the user account does not haveview-name-only access (324).

At the conclusion of the method illustrated in FIG. 4 , authorizationservice 132 can return an answer to server file journal 148 that theuser account either has read or write access 312, does not have access324, or has partial access 326 (meaning that the user account can seesome of the folder to which the user account has requested (302)access). When authorization service 132 returns an answer that the useraccount has partial access 326, this triggers a namespace view filter toidentify allowed folders and content items.

Mount Table

FIG. 6 illustrates an example mount table 380. As introduced above,mount table 380 includes a listing of paths for each folder inorganization directory 201. Mount table 380 includes at least thefields: directory ID 382, namespace ID 384, team user ID 386, path 388,target namespace 390, and active 392. Directory ID field 382 includes anidentifier for each folder in organization directory 201. Namespace IDfield 384 includes an identifier for each namespace including the folderin organization directory 201. In some embodiments, such as illustratedby box 396 and elsewhere in mount table 380 the directory ID and thenamespace ID are identical when the folder is the root of the namespace.For instance, design folder 204 is a team-shared folder and its ownnamespace. In some embodiments, such as illustrated by box 394 in mounttable 380 the directory ID in the namespace ID are different when thefolder is not the root of the namespace. For instance, folder 223 is asub-folder of finance folder 206 that inherits properties from financefolder 206, and therefore is a directory that is not its own namespace.

Mount table 380 also includes team user ID field 386 which lists a userID for each member folder. Team user ID field 386 can be used to filtermount table 380 to only return the member folder that is specific to theuser ID. As addressed above, an organization directory such asorganization directory 201 can include many member folders 202 and eachof the member folders is visible only to a specific user account.

Mount table 380 also includes path field 388 which includes a completepath for each folder. Target namespace field 390 includes the namespaceto which the namespace containing the folder identified in directory ID382 is mounted. For example entry 398 identifies the target namespacefor folder 221 as target namespace 2=marketing folder 208, which isitself mounted in target namespace 1=Acme 201. Note Acme's targetnamespace is “root” since Acme is the root namespace.

Active field 392 indicates whether the listed mount is still active witha bit “1” when the mount is still valid, or “0” when the folder has beenunmounted.

Cursor

After authorization service 132 determines that a user account hasaccess (whether partial access or read/write access) to a namespace andcan therefore read from server file journal 148, the latest entries inserver file journal 148 for that namespace can be sent to client device150 to bring client device 150 into synchronization with contentmanagement system 110. Along with information regarding the latestentries in server file journal 148, content management system 110 alsosends a cursor to client device 150. The cursor serves several importantfunctions.

First the cursor includes the namespace id (ns_id) and the server filejournal id (sj_id) for the entry in server file journal 148. These dataitems identify the last entry from server file journal 148 that has beensent to client device 150, and consequently, when client device 150later requests additional updates or requests to commit a change tocontent management system 110 client device 150 can return the cursorreceived from content management system 110 along with the request. Ifthe request is to commit a change, then content management system 110can determine if the cursor reflects the latest entry in server filejournal 148 for the namespace identified in the request. If the cursorreflects the latest entry, then client device 150 is allowed to committhe revision. If the cursor does not reflect the latest entry, thenclient device 150 must first receive the revisions subsequent to thesj_id identified in the cursor. If the request is to read from serverfile journal 148, then content management system 110 can send anyrevisions subsequent to the sj_id identified in the cursor to clientdevice 150.

Second, the cursor can include the last observed access state for theuser account with respect to a namespace(s). After authorization service132 has confirmed that a user account has access to a namespace(s),content management system 110 can include any namespaces to which theuser account has access in the cursor, and can also include a list ofpaths to which the user account has partial access in the cursor. Thisway, whenever client device 150 requests access to a namespace, and thenamespace is identified in the cursor, then content management system110 can know that the user account had access to the identifiednamespace as of the sj_id listed in the cursor for that namespace.Assuming that no access changes have occurred since the sj_id listed inthe cursor for the namespace, client device 150 still has access.

Third, the cursor can be encrypted and signed to ensure that it has notbeen tampered with since content management system 110 send the cursorto client device 150. This allows content management system 110 to trustthe information in the cursor when content management system 110determines that the cursor bears the correct signature.

In some embodiments there can be a cursor for each namespace to which auser account has access. In some embodiments, one cursor can include allinformation for all namespaces to which a user account has access.

Server Synchronization Service (Tomahawk)

Having above introduced the concepts of the data model and determiningaccess to folders within an organization directory, the description nowturns to a description of synchronizing an organization directory suchas organization directory 201.

FIG. 7 illustrates a schematic diagram of an example architecture forsynchronizing content between content management system 110 and clientdevice 150 in system configuration 100. In this example, client device150 interacts with content storage 142 and server file journal 148respectively via content storage interface 410 and file journalinterface 404. Content storage interface 410 can be provided or managedby content storage service 116, and file journal interface 404 can beprovided or managed by server synchronization service 112. For example,content storage interface 410 can be a subcomponent or subservice ofcontent storage service 116, and file journal interface 404 can be asubcomponent or subservice of server synchronization service 112.

Content storage interface 410 can manage communications, such as contentrequests or interactions, between client device 150 and content storage142. Content storage interface 410 can process requests from clientdevice 150 to upload and download content to and from content storage142. Content storage interface 410 can receive content requests (e.g.,downloads, uploads, etc.) from client device 150, verify permissionsfrom FSAuth token in a cursor (to be described below) or throughauthorization service 132 (as described in FIG. 4 ) to determine ifclient device 150 (and/or the request from client device 150) isauthorized to upload or download the content to or from content storage142, and interact with content storage 142 to download or upload thecontent in content storage 142 to client device 150. If the request fromclient device 150 is a request to download a content item, contentstorage interface 410 can retrieve the content item from content storage142 and provide the content item to client device 150. If the requestfrom client device 150 is a request to upload a content item, contentstorage interface 410 can obtain the content item from client device 150and upload the content item to content storage 142 for storage.

When processing content requests from client device 150, content storageinterface 410 can communicate with storage index 402 to check theavailability and/or storage location of the requested content in contentstorage 142, and track content items in content storage 142. Storageindex 402 can maintain an index of content items on content storage 142which identifies the content items on content storage 142 and can alsoidentify a respective location of the content items within contentstorage 142. Thus, storage index 402 can track content items on contentstorage 142 as well as storage locations of the content items. Storageindex 402 can track entire content items, such as files, and/or portionsof the content items, such as blocks or chunks. In some cases, contentitems can be split into blocks or chunks that can be stored at contentstorage 142 and tracked in storage index 402. For example, contentstorage 142 can store a content item as blocks or chunks of data whichinclude respective data portions of the content item. Storage index 402can track the blocks or chunks of the content item stored in contentstorage 142. FIG. 7 described below illustrates an example configurationfor storing and tracking blocks of content items.

File journal interface 404 can manage communications, such as metadatarequests and content synchronizations and operations, between clientdevice 150 and server file journal 148. For example, file journalinterface 404 can translate, validate, authenticate, and/or processoperations, configurations, and state information between client device150 and server file journal 148. File journal interface 404 can verifypermissions from an FSAuth token in a cursor (to be described below) orthrough authorization service 132 (as described in FIG. 4 ) toauthorize, or verify authorization of, requests sent by client device150 to server file journal 148. When processing requests or operationsfrom client device 150, file journal interface 404 can access namespacemembership store 408 to determine or verify namespace ownershipinformation for any namespaces associated with the requests oroperations from client device 150, and retrieve permissions informationfrom access control list 145, 147 to verify permissions of contentassociated with the requests or operations from client device 150.

Translation service 406 in file journal interface 404 can performlinearization and translation operations for communications betweenclient device 150 and server file journal 148. For example, translationservice 406 can translate communications from client device 150 to adifferent format consistent with the structure and format of data inserver file journal 148, and vice versa. To illustrate, in some cases,client device 150 can process content item information (e.g., state,changes, versions, etc.) at client device 150 as operations, whileserver file journal 148 can process the same information as content itemrevisions reflected by rows in a data structure such as a databasetable. To enable synchronization of content item information betweenclient device 150 and server file journal 148, translation service 406can translate operations from client device 150 into revisions suitablefor server file journal 148, and can translate revisions reflected inrows of data on server file journal 148 to operations suitable forclient device 150.

In some cases, authorization service 132 can generate a token thatverifies or indicates that client device 150 is authorized to access,update, download, or upload a requested content item. The token caninclude a device identifier associated with client device 150, anaccount identifier associated with a user account authenticated orauthorized at client device 150, a session identifier associated with anauthorized session at client device 150, a view context, and accesspermissions to identified folders. The token can be included in acryptographically signed data object called a cursor, which will bedescribed in greater detail below. Content management system 110 cansend the token(s) to client device 150, and client device 150 canprovide the token to content management system when requesting contentitem revisions and/or updates to server file journal 148 as furtherdescribed below. Client device 150 can also provide the cursor includingthe token to content storage interface 410 to validate any contentrequests (e.g., downloads, uploads, etc.). Content storage interface 410can use the cursor including the token to authorize queries to storageindex 402 and upload or download content items to or from contentstorage 142.

FIG. 7 illustrates an example block storage and synchronizationconfiguration. In this example, content storage 142 can store blocks ofdata, which can be opaque chunks of content items (e.g., files) up to aparticular size (e.g., 4 MB). Content items can be split into blocks andthe blocks can be stored at content storage 142 for access. Storageindex 402 can track blocks stored at content storage 142, as well as therespective locations of the blocks stored at content storage 142. Filejournal interface 404 can interact with server file journal 148 to trackrevisions to the content items and/or blocks stored at content storage142.

As previously mentioned, server file journal 148 tracks content itemrevisions, including content item adds, edits, moves or renames,deletes, etc. Accordingly, file journal interface 404 can store revisiondata at server file journal 148 to indicate that a content item wasadded to content storage 142, or a revision of the content item wasmade.

FIG. 8A illustrates a diagram of communications processed by filejournal interface 404 between client device 150 and server file journal148. Server file journal 148 tracks content item state and changes(e.g., revisions) as values in rows and fields in server file journal148. For example, server file journal 148 can maintain one or morejournals of revisions to content items in content storage 142. The oneor more journals can track revisions of each content item on eachnamespace. A row of values in a journal on server file journal 148 canidentify a content item in a namespace and reflects a state of thecontent item in the namespace. A subsequent row in the journalcorresponding to the same content item in the namespace can reflect asubsequent revision to the content item in the namespace. Thus, rows inserver file journal 148 associated with a content item can identify thecurrent state of the content item and any revisions to the content itemfrom creation to the current state.

To synchronize content item information (e.g., state, changes orrevisions, etc.) with client device 150, server file journal 148 cansend or receive revisions data 414 to or from file journal interface404, which represent revisions tracked or stored in server file journal148 for one or more content items. Revisions data 414 can include, forexample, a log of content item revisions corresponding to rows in serverfile journal 148. Server file journal 148 can send revisions data 414 tofile journal interface 404, which can translate revisions data 414 intooperations data 412 for client device 150, as further described below.

Client device 150 can perform content operations to update or modifycontent items at client device 150. To synchronize content iteminformation with server file journal 148, client device 150 can send orreceive operations data 412 to or from file journal interface 404.Client device 150 can send operations data 412 to file journal interface404 to report changes at client device 150 to content items, and receiveoperations data 412 from file journal interface 404 to obtain the lateststate of content items from server file journal 148 (e.g., revisionsdata 414).

For example, client device 150 can edit content item A at client device150 and report to file journal interface 404 an edit operationindicating the edit to content item A. The edit operation can beincluded in operations data 412 communicated with file journal interface404 to indicate the revision to content item A. File journal interface404 can receive operations data 412 including the edit operation andgenerate a revision for storage at server file journal 148, tracking theedit to content item A. File journal interface 404 can include therevision associated with the edit operation in revisions data 414 toserver file journal 148, in order to update server file journal 148 tostore the revision representing the edited state of content item A.

As further described below, operations data 412 can include a cursorwhich identifies the latest state or revision obtained by client device150 for each namespace associated with client device 150. For example,the cursor can identify the latest revision in server file journal 148obtained by client device 150 for each namespace associated with clientdevice 150. The information in the cursor allows file journal interface404 to determine whether an operation in operations data 412 from clientdevice 150 reflects the latest state or revisions in server file journal148 for the namespace(s) associated with the operation. This can helpfile journal interface 404 ensure that operations in operations data 412from client device 150 that correspond to older revisions in server filejournal 148 are not written to server file journal 148, which can createa conflict between existing revisions in server file journal 148 andrevisions translated from operations data 412.

To enable synchronization of content item information between clientdevice 150 and server file journal 148, file journal interface 404 cantranslate (e.g., via translation service 406) operations data 412 torevisions data 414, and vice versa. When receiving operations data 412from client device 150, file journal interface 404 can convertoperations data 412 to revisions data 414, which includes content itemrevisions interpreted from operations in operations data 412. Whenreceiving revisions data 414 from server file journal 148, file journalinterface 404 can convert revisions data 414 to operations data 412,which include operations for implementing revisions in revisions data414 at client device 150. Revisions data 414 includes data in serverfile journal 148 describing what happened to one or more content items(i.e., revisions to the one or more content items), and operations data412 includes operations that have been executed or should be executed atclient device 150 to modify the one or more content items. Thus, filejournal interface 404 can translate data describing revisions to one ormore content items from server file journal 148 (e.g., operations data412) to operations that have or should be executed at client device 150to modify the one or more content items at client device 150.

As previously noted, in addition to translating operations data 412 fromclient device 150 to revisions data 414 for server file journal 148,file journal interface 404 can convert revisions data 414 from serverfile journal 148 to operations data 412 for client device 150. Filejournal interface 404 can obtain revisions data 414 from server filejournal 148 and translate revisions in revisions data 414 to operationsfor execution at client device 150 to revise one or more content itemsat client device 150 according to such revisions. The operationsgenerated from the revisions in revisions data 414 are included inoperations data 412 provided by file journal interface 404 to clientdevice 150. This translation between operations data 412 and revisionsdata 414 allows client device 150 and server file journal 148 tosynchronize content item information with each other as necessary.

Prior to writing any revision data 414 generated from operations data412 provided by client device 150 to server file journal 148, filejournal interface 404 can check a cursor in operations data 412 and/orquery server file journal 148 to ensure any revisions in revisions data414 do not create a conflict in server file journal 148. For example,file journal interface 404 can query server file journal 148 to checkwhether the version of a content item associated with a revision inrevisions data 414 is the same version of the content item at serverfile journal 148, or whether the version of the content item at serverfile journal 148 is an updated or different version as the content itemto which the revision in revisions data 414 pertains. If server filejournal 148 shows that the latest version of the content item is adifferent version than the version to which revision data 414 pertains,the two versions are in conflict.

File journal interface 404 can update server file journal 148 to storenew revisions included in revisions data 414 derived from operationsdata 412. When querying and/or updating revisions in server file journal148, file journal interface 404 can query namespace membership store 408to retrieve namespace ownership information associated with anynamespaces affected by the revisions in revisions data 414. Thenamespace ownership information can indicate which user account(s) own aparticular namespace and/or are able to access and modify the particularnamespace. Thus, file journal interface 404 can analyze the namespaceownership information to ensure server file journal 148 is not updatedto include a revision to a namespace from a user account that is notauthorized to make such revision to the namespace.

With reference to FIG. 8B, server file journal 148 can store data forfields 418 to track and identify content item revisions. In thisexample, fields 418 include a namespace identifier (NS_ID), serverjournal identifier (SJ_ID), path, block, previous revision (Prev_Rev),action, and target namespace (Target_NS). NS_ID can include one or morevalues for uniquely identifying a namespace in server file journal 148.SJ_ID include monotonically increasing values which map to a row in agiven namespace and provides an ordering of operations or revisionswithin that namespace. The path can be a namespace-relative path thatidentifies an associated content item. Prev_Rev identifies the SJ_ID ofthe row which corresponds to the previous state of the content itemassociated with the path. Action includes a description of the actionwith respect to the content item including actions such as mount, move,add, delete, edit, etc. “Is Latest” includes a binary value indicatingwhen a row is the latest entry in server file journal 148 for that fileID or collection ID. Target_NS identifies the NS_ID of the targetnamespace for a mount point of a mounted namespace. The Target_NS fieldis not set for rows (e.g., revisions) which do not correspond to mountpoints.

In some cases, server file journal 148 can include other fields such asa size field which represents the size of an associated content item, adirectory field (e.g., Is_Dir) which can be set to indicate when acontent item is a directory, a file identifier that uniquely identifiesthe associated file, a clock or timestamp field, etc.

File journal interface 404 can perform translation 420 based onoperations data 412 and revisions data 414 as previously mentioned. Whenperforming translation 420, translation service 406 can transformoperations data 412 into revisions 422, which include linearizedrevisions for storage at server file journal 148. Translation service406 can also transform revisions data 414 into linearized operations424A, included in operations data 412 sent to client device 150, whichcan be applied by client device 150 to update content item information(e.g., state, changes, etc.) at client device 150. Translation service406 can also generate or update cursor 424B and provide cursor 424B inoperations data 412 to client device 150.

Cursor 424B identifies a respective revision or row in server filejournal 148 corresponding to each namespace and/or content itemassociated with linearized operations 424A. For example, cursor 424B canidentify a namespace (e.g., NS_ID) and row in server file journal 148for that namespace (e.g., SJ_ID), which indicate the latest revision inserver file journal 148 for that namespace. Cursor 424B can also includethe FSAuth token (addressed above) including the user ID, client device150, a session identifier, a view context, and the last observed accesspermissions to the NS_ID provided in the cursor. The cursor can becryptographically signed by content management system 110. Thecryptographic signature can used to verify that a malicious entityhasn't forged the cursor or changed any properties of the cursor.

The namespace and row in cursor 424B can be associated with an operationin linearized operations 424A. Cursor 424B can identify a specificposition on a log of revisions in server file journal 148 for theparticular namespace, indicating the revision or state of the namespacein server file journal 148 after and/or before linearized operations424A are applied at client device 150. Thus, cursor 424B can indicatethe state of a namespace and/or content item in server file journal 148before or after linearized operations 424A, which can help avoidrevision conflicts and track the order of revisions before and afterlinearized operations 424A are applied.

FIG. 9A illustrates a diagram of an example translation andlinearization process for translating server file journal data tolinearized operations. Server file journal 148 stores journal 426including rows 428 which include revisions 422. In this example, journal426 tracks revisions (422) for multiple namespaces, namely namespaces100 and 101 (i.e., NS_IDs 100 and 101). However, in some cases, serverfile journal 148 can store namespace-specific journals that trackrevisions specific to respective namespaces. The rows (e.g., rows 428)in a namespace-specific journal include data specific to that namespace,and each row reflects a revision specific to that namespace.

Each row (428) in journal 426 includes a namespace identifier field(NS_ID) for uniquely identifying a namespace associated with that row, aserver journal identifier field (SJ_ID) that includes monotonicallyincreasing values which map to a row in a given namespace and providesan ordering of operations or revisions within that namespace. Journal426 also includes a path field (Path) for identifying anamespace-relative path of a content item, a block field (Block) foridentifying a block or blocklist associated with the content item, aprevious revision field (Prev_Rev) for identifying the row (i.e., SJ_ID)in journal 426 that represents the previous state or revision of thecontent item, and a target namespace field (Target_NS) for identifying atarget namespace for a mount point of a mounted namespace (if the rowcorresponds to a mount). There is no data for the Target_NS field forrows (e.g., revisions) which do not correspond to mount points.

The first of rows 428 in journal 426 identifies the first revision(SJ_ID 1) for “File1” (Path field value File1) in namespace “100” (NS_ID100), which corresponds to block “h1” and has no previous revisions(Prev_Rev) or target namespaces (Target_NS). Since the row does notinclude a previous revision or a target namespace, the revisionrepresented by the row corresponds to an addition at namespace “100” of“File1” associated with block “h1”. The row in journal 426 containingSJ_ID “4” represents the last revision in journal 426 for “File1” onnamespace “100”, since this row is the last row or SJ_ID in journal 426corresponding to “File1” on namespace “100”. This row containing SJ_ID“4” indicates that “File1” on namespace “100” was edited after beingadded in SJ_ID “1”, and the edit corresponds to block “h4”.

Modifications 429 depict an example of modifications representingrevisions 422. In this example, each of modifications 429 illustrates acontent revision from a corresponding row (428) in journal 426. Eachmodification corresponds to an SJID and NSID in journal 426, and a fileassociated with the corresponding SJID and NSID in journal 426. In thisexample, the content associated with modifications 429 representsexample content values of the blocks (e.g., “h1”, “h2”, “h3”, “h4”) injournal 426. The content values in modifications 429 are provided forillustration purposes to depict example modifications to contentassociated with each revision.

For example, the first modification in modifications 429 represents SJID“1” and NSID “100” in journal 426, and depicts “File1” in namespace“100” being added. Content “aaa” represents a value of “h1” for “File1”at SJID “1” of NSID “100”. Modifications 429 also depict an edit of“File1” in namespace “100” representing SJID “4” and NSID “100” injournal 426, which illustrates the content “aaa” (e.g., “h1”) associatedwith “File1” in namespace “100” being modified to “aa2” (e.g., “h4”).

In translation 420, revisions 422 from rows 428 in journal 426 areconverted to linearized operations 424A. Linearized operations 424A aregenerated from revisions 422 in journal 426 and represent modifications429 after linearization. As illustrated by linearized operations 424A,an operation in linearized operations 424A can be based on multiplerevisions (422) and/or modifications (429), or a single revision (422)and/or modification (429).

For example, modifications 429 depict a revision adding “File1” tonamespace “100”, which corresponds to SJID “1” and NSID “100” in journal426, and a revision editing “File1” in namespace “100”, whichcorresponds to SJID “4” and NSID “100” in journal 426. The add revisioncan be inferred from the content value “aaa” (e.g., “h1”) associatedwith “File1” and NSID “100” and the lack of any previous revisions for“File1” and NSID “100”. In other words, the content “aaa” indicates thatcontent (e.g., “h1”) was either added or edited, and the lack of aprevious revision for “File1” and NSID “100” suggests that the content“aaa” represents content (e.g., “h1”) being added as opposed to edited.The edit revision can be inferred from the content value “aa2” (e.g.,“h4”) associated with “File1” and NSID “100” and the previous revision(SJID “1” and NSID “100”) associated with “File1” and NSID “100”. Inother words, the change from content “aaa” to “aa2” associated with“File1” and NSID “100” suggests that the content “aa2” represents anedit.

In linearized operations 424A, the add and edit modifications (429)corresponding to SJID “1” and SJID “4” for NSID “100” can be convertedinto a single linearized operation (Edit operation) which edits thecontent value associated with “File1” from “aaa” (e.g., “h1”) to “aa2”(e.g., “h4”). The single linearized operation editing content (e.g.,“h1”) of “File1” to “aa2” (e.g., “h4”) reflects the modification adding“File1” associated with content “aaa” (e.g., “h1”) to namespace “100”,as well as the modification editing content “aaa” (e.g., “h1”)associated with “File1” in namespace “100” to “aa2” (e.g., “h4”).Accordingly, this linearized operation is based on two modifications 429and two corresponding revisions in revisions 422.

The modification in modifications 429 corresponding to SJID “2” and NSID“100” in journal 426 represents a revision adding “File2” associatedwith content “bbb” (e.g., “h2”) to namespace “100”. This modificationrepresents the only revision 422 from journal 426 corresponding to“File2” on namespace “100”. Accordingly, linearized operations 424Ainclude a single operation for “File2” on namespace “100”, which adds“File2” associated with content “bbb” (e.g., “h2”) to namespace “100”and is based on a single modification 429 (add of “File2” on namespace“100”) and revision 422.

Modifications 429 in this example also include a modification adding“File3” associated with content “ccc” (e.g., “h3”) to namespace “100”,which corresponds to SJID “3” and NSID “100” in journal 426, and adelete (represented as “−1”) of “File3” from namespace “100”, whichcorresponds to SJID “5” and NSID “100” in journal 426. Thus, revisions422 include two modifications 429 associated with “File3” on namespace“100”. Since the last revision in journal 426 associated with “File3”and namespace “100” corresponds to the delete modification representingSJID “5” and NSID “100” in journal 426, the add and delete modifications429 associated with “File3” and namespace “100” from revisions 422 canbe linearized to a single operation deleting “File3” from namespace“100”. Accordingly, linearized operations 424A include a singleoperation for “File3” and namespace “100”, which is the single operationdeleting “File3” from namespace “100”.

SJIDs “6” and “7” for NSID “100” and SJID “1” for NSID “101” in journal426 represent “Dir” being added to namespace “100” and later moved fromnamespace “100” to namespace “101”. For example, SJID “6” and NSID “100”identifies “Dir” and namespace “100” and does not include a previousrevision, which indicates “Dir” was added to namespace “100” at SJID“6”. SJID “7” identifies “Dir” being moved from namespace “100” tonamespace “101”, as reflected by the block field (“-”), the previousrevision field (SJID “6”), and the target namespace field (“101”). SJID“1” for NSID “101” then identifies “Dir” being added to namespace “101”,as indicated by the lack of prior rows or revisions for “Dir” andnamespace “101”. The add and move revisions in SJIDs “6” and “7” in NSID“100” and SJID “1” in NSID “8” are depicted by three modifications 429:an add of “Dir” to namespace “100” which corresponds to SJID “6” andNSID “100”, a delete of “Dir” from namespace “100” which corresponds toSJID “7” and NSID “100”, and an add of “Dir” to namespace “101” whichcorresponds to SJID “1” and NSID “101”.

The add and delete modifications 429 of “Dir” and namespace “100”, whichrespectively correspond to SJIDs “6” and “7” of NSID “100” in journal426, are linearized to a single operation deleting “Dir” from namespace“100, since the last revision in journal 426 corresponding to “Dir” andnamespace “100” is a delete of “Dir” from namespace “100” at SJID “7”and NSID “100”. The add of “Dir” to namespace “101”, which correspondsto SJID “1” and NSID “101” in journal 426, is the only modification 429and revision 422 corresponding to “Dir” and namespace “101”.Accordingly, the add is provided in linearized operations 424A as asingle mount operation for “Dir” and namespace “101”. Therefore, thethree modifications 429 from revisions 422 corresponding to SJIDs “6”and “7” in NSID “100” and SJID “1” in NSID “101” (i.e., the add anddelete of “Dir” on namespace “100”, and the add of “Dir” on namespace“101”), are linearized to two operations in linearized operations 424A:a delete operation for “Dir” in namespace “100” and a mount operationfor “Dir” in namespace “101”.

As illustrated above, linearized operations 424A include an editoperation for “File1” and namespace “100”, an add operation for “File2”and namespace “100”, a delete operation of “File3” in namespace “100”, adelete operation for “Dir” in namespace “100”, and amount operation foradding “Dir” to namespace “101”. These operations in linearizedoperations 424A are generated from revisions 422 and reflect the lateststate of each content item in journal 426. File journal interface 404can generate linearized operations 424A and send linearized operations424A to client device 150 to ensure client device 150 contains thelatest state from revisions 422 in journal 426.

When providing linearized operations 424A to client device 150, filejournal interface 404 can include cursor 424B along with linearizedoperations 424A to client device 150. Cursor 424B can identify the lastrevision (SJID) for each namespace (NSID) in journal 426. In someembodiments, cursor 424B can also include the FSAuth token including theuser ID, and the last observed access permissions to the NS_ID providedin the cursor. The last revision for each namespace can indicate aposition in journal 426 corresponding to the latest revisions sent toclient device 150 for each namespace.

In some cases, cursor 424B can also map each operation in linearizedoperations 424A to a namespace (NSID) and row (SJID) in journal 426. Thenamespace and row associated with an operation can indicate the positionin journal 426 corresponding to the operation. In other words, thenamespace and row associated with an operation can indicate the revisionnumber in journal 426 represented by that operation. The namespaces androws in cursor 424B correspond to the latest state in journal 426 foreach namespace and content item associated with linearized operations424A. Cursor 424B can be provided to client device 150 as a tool forclient device 150 to identify to file journal interface 404 the lateststate or revisions obtained by client device 150 for one or morenamespaces and/or content items when attempting to apply changes (e.g.,via operations data 412) from client device 150 to the one or morenamespaces and/or content items. When file journal interface 404receives cursor 424B from client device 150, it can use cursor 424B toidentify the position of client device 150 at journal 426 (e.g., thelatest revisions from journal 426 obtained by client device 150) anddetect or avoid conflicts caused by operations from client device 150.

In some embodiments, cursor 424B can also include the FSAuth tokenincluding the user ID, and the last observed access permissions to theNS_ID provided in the cursor. File journal interface 404 can use cursor424B to verify a user account and client device's rights to read from orwrite to server file journal 148.

For example, if file journal interface 404 receives an operation fromclient device 150 modifying “File1” in namespace “100”, file journalinterface 404 can use cursor 424B, which it receives from client device150 along with the operation, to check whether journal 426 has any newerrevisions in namespace “100” than the revision identified in cursor 424Bfrom client device 150. If the revision in cursor 424B is the mostcurrent revision in journal 426, file journal interface 404 can committhe edit operation as a new revision in journal 426 (e.g., SJID “8” inNSID “100”) for “File1” in namespace “100”.

Alternatively, if the revision in cursor 424B is not the most currentrevision in journal 426 for namespace “100”, file journal interface 404can determine that client device 150 is not synchronized. A requirementfor client device to commit changes to content management system 110 isthat client device is synchronized. Accordingly, content managementsystem 110 can send any update operations to namespace “100” to clientdevice.

Each time file journal interface 404 sends linearized operations toclient device 150, it can include a cursor as described herein whichidentifies a respective position in journal 426 for each namespaceand/or content item. In some embodiments, cursor 424B can also includethe FSAuth token including the user ID, and the last observed accesspermissions to the NS_ID provided in the cursor. In some embodiments,the cursor can be cryptographically signed by content management system110. Any time client device 150 sends an operation to file journalinterface 404, it can include its latest cursor it received from filejournal interface 404, which file journal interface 404 can use to mapthe state at client device 150 with the state at journal 426, and canuse to determine whether client device 150 has access to a namespacelisted in the cursor.

Journal 426 in this example depicts a journal with multiple namespaces.As previously noted, in some examples, server file journal 148 canmaintain namespace-specific journals. Cursor 424B may include an SJIDand NSID for each namespace, to indicate the latest revision for eachnamespace. Based on cursor 424B, file journal interface 200 can querymultiple journals, in embodiments where multiple journals aremaintained, and/or retrieve revisions from multiple journals, as furtherexplained herein.

FIG. 9B illustrates a diagram of an example process for linearization430 to convert operations data 412 from client device 150 to revisions422 for journal 426 at server file journal 148. Client device 150 canprovide operations data 412 to file journal interface 404. Operationsdata 412 in this example includes operations 412 at client device 150,such as content item edit, add, rename, move, mount, or deleteoperations. In some cases, operations 412 can include multipleoperations to a same content item. For example, operations 412 caninclude an operation editing “File4” on namespace “100” and an operationdeleting “File4” from namespace “100”.

Operations data 412 also includes cursor 424B previously received byclient device 150 from file journal interface 404. Cursor 424B canidentify the state (e.g., NSID and SJID) of latest revisions in journal426 for one or more namespaces and/or content item and can also includethe FSAuth token including the user ID, and the last observed accesspermissions to the NS_ID provided in the cursor. Client device 150 canprovide cursor 424B to file journal interface 404 as a reference pointfor operations 412. In this example, cursor 424B provides the lateststate for namespace “100”, which is represented by SJID “9”.

Since the cursor was cryptographically signed by content managementsystem 110, file journal interface 404 can determine that the cursor hasnot been tampered with. Further, since client device 150 can only commitrevisions to server file journal 148 when it has received the mostrecent revisions from server file journal 148 for the namespace, filejournal interface 404 can accept that the last observed accesspermissions to the NS_ID are still valid, and therefore client devicehas access to the namespace.

File journal interface 404 can receive operations 412 and cursor 424Band perform linearization 430, to linearize and transform operations 412from client device 150 to revisions 422 for journal 426. Based onoperations 412, file journal interface 404 can generate log 433 ofoperations. Log 433 can include a list of operations from operations 412mapped to respective namespace(s) in journal 426. In some cases, log 433can include linearized operations (424A) generated from operations 412as previously explained.

File journal interface 404 can use cursor 424B to verify that operations412 reflect the latest state or revisions in journal 426 before updatingjournal 426 to reflect the operations in log 433. If file journalinterface 404 confirms that cursor 424B reflects the latest state orrevisions in journal 426 for the namespaces and/or content itemsassociated with log 433, file journal interface 404 can add revisions422 to journal 426 based on log 433. Revisions 422 can include thelatest state or revision of each content item and/or namespaceassociated with the operations in log 433.

The operations in log 433 include an add and edit operation for “File5”.Accordingly, revisions 422 include the edit of “File5”, which filejournal interface 404 can write to journal 426 as the latest state of“File5” (i.e., the state after the add and edit operations are appliedto “File5” in a linearized fashion). The operations in log 433 alsoinclude an add operation for “Dir2” as well as edit and deleteoperations for “File4” on namespace “100”. Revisions 422 can thusinclude an operation adding “Dir2” to namespace “100” and an operationdeleting “File4” from namespace “100” as the latest state of “Dir2” and“File4” respectively.

In FIG. 9B, the revisions (422) depicted in journal 426 reflect thelatest state of each content item (“File4”, “File5”, “Dir2”) associatedwith operations 412. However, it should be noted that, in some cases,file journal interface 404 can write every revision represented by log433 to journal 426 in order to reflect not only the latest staterevision of each namespace and/or content item resulting from log 433,but also any previous states or revisions leading up to the latest stateor revision. For example, file journal interface 404 can write arevision in journal 426 for the edit of “File4” and a subsequentrevision for the delete of “File4”, as opposed to only writing the editof “File4” reflecting the latest state from operations 412, to indicatein journal 426 the full sequence of revisions of “File4” from operations412.

File journal interface 404 can transform operations in log 433 torevisions 422 and update journal 426 to include revisions 422. Filejournal interface 404 can write revisions 422 to journal 426 atrespective rows in journal 426. File journal interface 404 can addrevisions 422 to the next available rows (e.g., SJIDs) in journal 426.In some cases, file journal interface 404 can add revisions 422 based ona relative order which can be determined based on linearization 430and/or respective timestamps or clocks.

As shown in FIG. 9B, the delete operation of “File4” in namespace “100”is included in row “11” or SJID “11” for namespace “100”. The revisionin SJID “11” of journal 426 indicates that “File4” in namespace “100”has been deleted, as reflected by the minus symbol in the block field,and identifies SJID “9” as the previous revision in journal 426 for“File4” in namespace “100”. The addition of “Dir2” and edit of “File5”are included respectively in rows or SJIDs 12 and 14.

Journal 426 in FIG. 9B has been updated to include revisions 422 basedon log 433 and cursor 424B, to reflect the state of each content itemmodified in log 433. The path field at each row in journal 426identifies a content item within the associated namespace (e.g.,namespace “100”). The path field of a row is based on the file andnamespace from a corresponding operation in log 433. The block field injournal 426 represents the content item. In some cases, the block fieldcan include a hash of a respective content item or data block. The blockfield can be empty if the content item has been deleted and/or is adirectory, folder, mount, etc.

When updating journal 426 to include revisions 422 based on log 433 andcursor 424B, translation service 406 can identify the path of eachcontent item to include in the path field of journal 426. In some cases,translation service 406 can translate an identifier of a content item(e.g., File ID) to a path of the content item(e.g.,/directory/filename). For example, client device 150 can useidentifiers to identify content items (e.g., content items in operationsdata 412) without having to track or calculate respective paths for thecontent items. Journal 426 may instead use a content item's path toidentify the content item. Translation service 406 can use theidentifiers of content items from client device 150 to calculate thepaths of the content items for journal 426, and update journal 426 usingthe paths calculated for the content items. Translation service 406 canalso perform a reverse translation to obtain a content item's identifierbased on the content item's path, and use the content item's identifierwhen referencing the content item in communications with client device150.

For example, translation service 406 can use the path in journal 426,NSID in journal 426, and/or a directory field in journal 426 (orelsewhere in server file journal 148) to identify a content item andobtain an identifier (e.g., File ID) of that content item. If filejournal interface 404 sends an update or information to client device150 pertaining to that content item, file journal interface 404 canprovide the identifier of the content item to client device 150, whichclient device 150 can use to identify the content item with or withoutthe path of the content item.

As previously mentioned, before writing revisions 422 to journal 426from operations 412, file journal interface 404 can check if cursor 424Breflects the latest state or revision in journal 426 for each namespaceand/or content item associated with operations 412. In some cases, afterconfirming that cursor 424B reflects the latest state or revisions injournal 426, file journal interface 404 can also perform a second checkto ensure that a revision generated from operations 412 will notconflict with an existing revision in journal 426. For example, if SJID“5” in namespace “100” at journal 426 represents a delete operation of“File5”, the edit revision 422 of “File5” depicted in SJID “14” emittedfrom operations 412 received by file journal interface 404 from clientdevice 150 would create a conflict by attempting to edit “File5” eventhough “File5” was deleted at SJID “5”. Thus, file journal interface 404can reject the edit operation and revision in this example, andcommunicate to client device 150 that the edit operation is invalid.File journal interface 404 can update cursor 424B and provide theupdated cursor to client device 150 to inform client device 150 of thelatest state or revision in journal 426 for “File5” (and any othercontent item) as necessary.

FIG. 10 illustrates a diagram of an example linearization ofcross-namespace operations. Cross-namespace linearization andcross-shard or cross-namespace listing can be performed via clockordering. Tables 432A, 432B (collectively “432”) illustrate a batch ofcross-namespace operations for linearization. Tables 432A, 432Brespectively include columns 436A, 438A, which are namespace (NSID)fields for identifying a namespace for the records in tables 432A, 432B,columns 436B, 438B are SJID fields for identifying rows or SJIDs intables 432A, 432B for respective namespaces in columns 436A, 438A,columns 436C, 438C are operations fields for identifying operationsassociated with each SJID, and columns 436D, 438D are clock fields foridentifying a timestamp associated with the operations in columns 436C,438C.

In this example, table 432A depicts SJIDs “100” and “101” for NSID “1”.SJID “100” is associated with an operation adding “foo.txt” to namespace“1” at timestamp “1000”, and SJID “101” is associated with an operationmounting namespace “2” at timestamp “1001”. Table 432B depicts SJIDs “1”and “2” for NSID “2”. SJID “1” is associated with an operation adding“bar.txt” to namespace “2” at timestamp “500”, and SJID “2” isassociated with an operation editing “bar.txt” at timestamp “1002”.

A linearizer (e.g., translation service 406) can obtain the batch ofoperations in tables 432 and emit a single stream of operations (442)with a cursor (444). The linearizer can identify all namespaces havingat least one operation in tables 432 and linearize the operations forall namespaces based on the respective timestamps, NSIDs, SJIDs. In thisexample, the batch of operations in tables 432 linearize to the streamof operations shown in table 434.

Table 434 includes NSID column 440 which includes NSID fields foridentifying the namespace of each operation, operations column 442 whichincludes operation fields for identifying the operations in table 434,and cursor column 444 which includes cursor fields for identifying acursor state for each operation. Row 434A in table 434 includes the addoperation from SJID “100” of namespace “1” in table 432A. The cursorstate in cursor column 444 for row 434A is namespace “1” and SJID “100”,which indicates the add operation corresponds to SJID “100” in namespace“1” shown in table 432A. Row 434B in table 434 does not include a valuein NSID column 440 or operations column 442, but updates the cursorstate in cursor column 444 to include a cross-namespace cursor state,which in this example adds SJID “0” for namespace “2”.

Row 434C in table 434 includes the add operation from SJID “1” innamespace “2” shown in table 432A. The cursor state in cursor column 444for row 434C includes the respective SJIDs “100” and “1” for namespaces“1” and “2” associated with the add operation in row 434C. As shown, thecursor state indicates the cursor is at SJID “100” in namespace “1” andSJID “1” in namespace “2”. In other words, the row or SJID in namespace“1” has not increased as the add operation does not affect the state ofnamespace “1”, but the row or SJID in namespace “2” has increased by oneas the add operation represents a revision in namespace “2” and affectsthe state of namespace “2”. Thus, the cursor state in row 434C tracksthe respective SJIDs for namespace “1” and namespace “2” after the addoperation at SJID “1” in namespace “2”.

Row 434D in table 434 includes the mount operation at SJID “101” andnamespace “1” at table 432A. The mount operation mounts namespace “2” atnamespace “1”. The mount operation increases the SJID in namespace “1”from “100” to “101”, but does not increase the SJID in namespace “2”.Accordingly, the cursor state in cursor column 444 for row 434D includesSJID “101” for namespace “1” and remains SJID “1” for namespace “2”.This cursor state reflects the state and/or order at namespaces “1” and“2”.

Row 434E in table 434 includes the edit operation at SJID “2” andnamespace “2” in table 432A, which according to the respectivetimestamps of the mount and edit operations, is after the mountoperation at SJID “101” in namespace “1”. The cursor state in cursorcolumn 444 of row 434E maintains the cursor state for namespace “1” atSJID “101” but increases the cursor state for namespace “2” to SJID “2”.

As illustrated in table 434, operations 442 are listed as a stream ofoperations linearized based on causality and timestamps acrossnamespaces “1” and “2”. Once operations 442 are linearized in table 434to reflect cross-namespace causality and sequencing, operations 442 canbe converted to revisions in server file journal 148 (e.g., revisions422 in journal 426) and written to server file journal 148.

For example, a journal for namespace “1” in server file journal 148 canbe updated to include a revision at SJID “100” representing the addoperation adding “foo.txt” to namespace “1”, and a revision at SJID“101” representing the mount operation mounting namespace “2” onnamespace “1”. Moreover, a journal for namespace “2” in server filejournal 148 can be updated to include a revision at SJID “1”representing the add operation adding “bar.txt” to namespace “2”, and arevision at SJID “2” representing the edit operation editing “bar.txt”on namespace “2”.

FIG. 11A illustrates an example method for translating operations fromclient device 150 to revisions for server file journal 148 and updatingserver file journal 148.

At step 468, file journal interface 404 receives a request from clientdevice 150 to synchronize operations pertaining to content itemsassociated with a user account registered at content management system110. The request includes operations (e.g., 412) associated with thecontent items and a cursor (e.g., 424B) identifying a current position(e.g., NSID: SJID) of client device 150 in journal 426 at server filejournal 148. In some embodiments the cursor can also include the FSAuthtoken including the user ID, and the last observed access permissions tothe NS_ID provided in the cursor. Each of the operations can include anamespace or a content item associated with a namespace. For example,the operations can include an operation to mount a namespace and anoperation to add, edit, or delete a content item on a namespace.

Since the cursor was cryptographically signed by content managementsystem 110, file journal interface 404 can determine that the cursor hasnot been tampered with. Further, since client device 150 can only commitrevisions to server file journal 148 when it has received the mostrecent revisions from server file journal 148 for the namespace, filejournal interface 404 can accept that the last observed accesspermissions to the NS_ID are still valid, and therefore client devicehas access to the namespace.

Based on the operations, at step 462, file journal interface 404generates a set of linearized operations (e.g., 424A) associated withthe content items, the set of linearized operations including arespective operation for each content item. The respective operation canbe derived from one or more of the operations in the request associatedwith the content item. For example, the respective operation can bebased on a single operation for the content item or multiple operationsin the request.

At step 464, file journal interface 404 converts each respectiveoperation in the set of linearized operations (e.g., 424A) to arespective revision (e.g., 422) for journal 426. The respective revisioncan represent a row (e.g., 428) of values for journal 426, reflectingthe respective operation. Based on the cursor, at step 466, file journalinterface 404 determines whether each respective revision conflicts withone or more revisions in journal 426.

For example, if the cursor indicates that client device 150 had notobtained the most recent revisions in journal 426 prior to therespective operation associated with the respective revision, filejournal interface 404 may determine that client device 150 does not havethe most current state from journal 426 and the respective revisionwould create a conflict as it modifies an outdated content item ornamespace. File journal interface 404 may then reject the respectiverevision, send an updated cursor and/or revision(s) to client device150, or attempt to reconcile the conflict with the latestrevisions/state in journal 426. As another example, if the cursorindicates that client device 150 has the latest revisions in journal426, file journal interface 404 may accept the respective revision. Insome cases, prior to accepting the revision, file journal interface 404can compare the respective revision with one or more previous revisionsin journal 426 to validate the respective revision and ensure it wouldnot conflict with previous revisions in journal 426. For example, filejournal interface 404 can identify the previous revision in journal 426for the content item (e.g., namespace, directory, file, etc.) associatedwith the respective revision, and check to ensure the respectiverevision does not conflict with the previous revision in journal 426.

At step 468, when the respective revision does not conflict with one ormore revisions in journal 426, file journal interface 404 can add therespective revision to journal 426. File journal interface 404 can addthe respective revision in a particular row in journal 426, which it canidentify based on the namespace associated with the respective revision.When new revisions are added to journal 426 and/or server file journal148, file journal interface 404 can send an updated cursor to clientdevice 150 to report the new revisions and synchronize the new revisionswith client device 150. Client device 150 can also request an update tothe cursor at client device 150. Client device 150 can store a copy ofthe last cursor received from file journal interface 404 as a reflectionof the state of content items on client device 150 and/or a position ofclient device 150 in journal 426 indicating the last revision(s)obtained by client device 150.

FIG. 11B illustrates an example method for converting revisions fromserver file journal 148 to operations for client device 150.

Client device 150 can request updates for one or more namespaces bymaking a request to file journal interface 404 along with a cursoridentifying the one or more NS_IDs for which updates are requested andSJIDs for each namespace indicating the last revision client device isaware of. The cursor can also include the FSAuth token including theuser ID, and the last observed access permissions for the NS_IDsprovided in the cursor.

Since the cursor was cryptographically signed by content managementsystem 110, file journal interface 404 can determine that the cursor hasnot been tampered with. Therefore, file journal interface 404 can acceptthat the last observed access permissions to the NS_ID are still validas of the SJIDs listed in the cursor, and therefore client device hasaccess to the namespace. However, the permissions may have changed sincethe SJIDs listed in the cursor. Accordingly, file journal interface 404watches for “mount” revisions, which can cause changes of access. If a“mount” revision is encountered file journal interface 404 queriesauthorization service 132 (as addressed in FIG. 4 ) to determine whetheruser account has access to the folder for which the mount was read fromserver file journal 148.

At step 470, file journal interface 404 retrieves, from journal 426 ofrevisions at server file journal 148, a plurality of revisions (e.g.,422) associated with one or more content items stored at client device150 for a user account registered at content management system 110. Eachrevision can modify a namespace, folder, file, or any content item.Moreover, each revision can be associated with a namespace and a journalidentifier (SJID) for that namespace.

In some cases, file journal interface 404 can retrieve the plurality ofrevisions from journal 426 based on a determination that journal 426 hasbeen updated to include revisions that are not available at clientdevice 150. For example, file journal interface 404 can track newrevisions added to journal 426 and/or compare revisions at journal 426with the cursor at client device 150. In some cases, file journalinterface 404 can query journal 426 to retrieve the plurality ofrevisions and/or check revisions available at journal 426.

At step 472, file journal interface 404 determines respective operationsbased on a respective set of revisions of each content item associatedwith the plurality of revisions. For example, file journal interface 404can linearize any revisions of a content item and translate therevisions to one or more respective operations for that content item. Insome cases, file journal interface 404 can also transform multipleoperations for that content item into a single operation defining orreflecting the state or modification of the content item when themultiple operations are executed in linear fashion.

In some cases, when calculating the respective operations for of theplurality of revisions, file journal interface 404 can make inferencesor calculations based on the number of revisions associated with aparticular content item and/or the type of content item associated withsuch revisions. For example, if the plurality of revisions includes asingle revision for a content item, file journal interface 404 can inferfrom the single revision (e.g., revisions 422) and/or a block or contentassociated with the revision (e.g., block or content in rows 428 ofjournal 426) a type of modification (e.g., 429) of the content itemrepresented by that revision, and calculate the respective operation forthat content item based on the type of modification represented by therevision.

To illustrate, as shown in FIG. 7 , modifications 429 depict amodification for “Dir” at namespace “101” corresponding to SJID “1” andNSID “100”. This modification is the only modification (429) andrevision (422) for namespace “101”. Thus, file journal interface 404 caninfer that the modification depicting “Dir” in namespace “101” is andadd or mount of “Dir”, as it represents the first instance of namespace“101” being modified or revised to include “Dir”. Since “Dir” is adirectory or folder, as illustrated by the block field in journal 426,the modification can be an add or mount of the directory or folder(which can trigger a look up of access rights from authenticationservice 132). If “Dir” was a namespace, the modification would representamount of namespace “Dir” at namespace “101”. On the other hand, if“Dir” was a file associated with a particular content or block, whichcould be determined based on the block field in journal 426, then themodification for “Dir” would be an add of the file “Dir” to namespace“101”. For example, if SJID “1” and NSID “101” instead depicted “File1”associated with “h1”, the corresponding modification would be an add of“File1” to namespace “101”.

Thus, unless the content or block field associated with a revision (422)in journal 426 depicts a deletion (e.g., a minus symbol in the block orcontent field), the respective operation for a first or only revision ofa content item can represent a mount or add operation depending onwhether the content item is a namespace or another type of content item.This is based on the assumption that other operations, such as an edit,unmount, or delete operation, would be expected to include a previousrevision for mounting or adding the associated content item. If acontent item does not have a previous revision associated with it, filejournal interface 404 can infer that a revision associated with thecontent item is likely not an edit, unmount, or delete operation, butrather an add or mount operation.

In some cases, file journal interface 404 can calculate an operation fora content item based on multiple revisions (422) for that content itemand associated namespace. For example, file journal interface 404 mayinfer a delete, edit, or unmount operation from a revision representingan add or mount of the content item and a subsequent revisionrepresenting the delete, edit, or unmount. To illustrate, as shown inFIG. 7 , file journal interface 404 calculates an edit operation for“File1” in namespace “100” based on multiple modifications (429) andrevisions (422) corresponding to SJIDs “1” and “4” for namespace “100”in journal 426. Since SJIDs “1” and “4” include blocks “h1” and “h4”,representing content values “aaa” and “aa2” in modifications 429, filejournal interface 404 can determine that SJID “1” represents an addoperation and SJID “4” represents an edit operation, with a resultingstate being based on the edit operation at SJID “4”.

Based on the respective operations, at step 474, file journal interface404 generates a set of linearized operations (e.g., 422) for eachcontent item. The set of linearized operations can reflect modifications429 of each content item based on the plurality of revisions in journal426. File journal interface 404 can convert the plurality of revisions(422) to the set of linearized operations (424A) by linearizing therespective operations calculated for each content item based on relativeclocks and/or causality.

At step 476, file journal interface 404 generates a cursor (e.g., 424B)identifying a position in journal 426 represented by the set oflinearized operations. At step 478, file journal interface 404 sends theset of linearized operations and cursor to client device 150. The cursorcan include a respective namespace identifier (NSID) and journalidentifier (SJID) for each namespace and/or operation and can alsoinclude the FSAuth token including the user ID, and the last observedaccess permissions to the NSID provided in the cursor. The combinationof an NSID and SJID in the cursor can indicate a revision number injournal 426 for a particular namespace. Client device 150 can use thecursor to identify revisions obtained by client device 150 and aposition of client device 150 in journal 426 corresponding to therevisions that have been obtained by client device 150. Client device150 can also provide its latest cursor to file journal interface 404 toreport to file journal interface 404 the current position of clientdevice 150 in journal 426. For example, client device 150 can providethe cursor to file journal interface 404 to determine if client device150 needs new revisions.

Client device 150 can also provide its cursor to file journal interface404 when reporting operations at client device 150 to file journalinterface 404. The cursor maps the operations to specific revisions injournal 426 and/or a position in journal 426. This allows file journalinterface 404 to determine if the operations from client device 150 arebased on the latest revisions to the content items being modified by theoperations.

Client device 150 can receive the cursor and set of linearizedoperations and update the content items at client device 150 based onthe operations. This way, client device 150 can synchronize contentitems between client device 150 and content management system 110.Client device 150 can store the cursor to provide its position injournal 426 to file journal interface 404.

Client Synchronization Service

After file journal interface 404 sends operations 412 to client device150 as described above, client synchronization service 156 can processthe operations and update its local databases and file system with theupdates received from content management system 110.

Client synchronization service 156 also determines that changes havebeen made on client device, and is responsible for sending operationsfrom client device 150 to file journal interface 404 as described above.

FIG. 12 shows an example of client synchronization service 156, inaccordance with some embodiments. Client synchronization service 156 isconfigured to synchronize changes to content items between a contentmanagement system and client device 150 on which client synchronizationservice 156 runs.

Client synchronization service 156 may include file system interface550, server interface 552, tree storage 554, planner 556, and scheduler558. Additional or alternative components may also be included. Highlevel descriptions of client synchronization service 156 and itscomponents are discussed below with respect to FIG. 12 . However,further details and embodiments of client synchronization service 156and its components are discussed throughout.

File system interface 550 is configured to process changes to contentitems on the local file system of the client device and update the localtree. For example, file system interface 550 can be in communicationwith client synchronization service 156 of FIG. 1 detect changes tocontent items on the local file system of the client device. Changes mayalso be made and detected via client application 152 of FIG. 1 . Filesystem interface 550 may make updates to the local tree may be madebased on the changes (new, deleted, modified, copied, renamed, or movedcontent items) to content items on the client device.

Server interface 552 is configured to aid in the processing of remotechanges to content items at a remote storage of the content managementsystem and updating of the remote tree. For example, server interface552 can be in communication with server synchronization service 112 ofFIG. 1 to synchronize changes to content items between client device 150and content management system 110. Changes (new, deleted, modified,copied, renamed, or moved content items) to content items at contentmanagement system 110 may be detected and updates may be made to theremote tree to reflect the changes at content management system 110.

Tree storage 554 is configured to store and maintain the tree datastructures used by client synchronization service 156. For example, treestorage 554 may store the local tree, the sync tree, and the remotetree. According to some embodiments, tree storage 554 may store the treedata structures in persistent memory (e.g., a hard disk or othersecondary storage device) as well as in main memory (e.g., RAM or otherprimary storage device) in order to reduce latency and response time.For example, on start-up of the client device or client synchronizationservice 156, the tree data structures may be retrieved from persistentmemory and loaded into main memory. Tree storage 554 may access andupdate the tree data structures on main memory and, before the clientdevice or client synchronization service 156 is shut down, tree storage554 may store the updated tree data structures on persistent memory.Because main memory is expensive in cost and often limited in size onmost client devices, additional technological improvements areimplemented to decrease the footprint of the tree data structures onmain memory. These technological solutions are described further below.

Planner 556 is configured to detect differences between the server stateassociated with the content management system and the file system stateassociated with the client device based on the state of the tree datastructures. For example, planner 556 may determine if there is adifference between the remote tree and the sync tree. A differencebetween the remote tree and the sync tree indicates that an actionperformed remotely on one or more content items stored at the contentmanagement system has caused the server state and the file system stateto become out of sync. Similarly, planner 556 may also determine ifthere is a difference between the local tree and the sync tree. Adifference between the local tree and the sync tree indicates that anaction performed locally on one or more content items stored on theclient device has caused the server state and the file system state tobecome out of sync. If a difference is detected, planner 556 generates asequence of operations that synchronize the tree data structures.

In some scenarios, a sequence of operations generated based on adifference between the remote tree and the sync tree and a sequence ofoperations generated based on a difference between the local tree andthe sync tree may conflict. Planner 556 may also be configured to mergethe two sequences of operations into a single merged plan of operations.

Scheduler 558 is configured to take the generated sequence of operationsand manage the execution of those operations. According to someembodiments, scheduler 558 converts each operation in the sequence ofoperations into a series of one or more tasks that need to be executedin order to perform the operation. In some scenarios, some tasks maybecome outdated or no longer relevant. Scheduler 558 is configured toidentify those tasks and cancel them.

Tree Data Structures Overview

FIG. 13 shows an example of tree data structures, in accordance withvarious embodiments. The tree data structures may be stored at theclient device and managed by a sync engine such as clientsynchronization service 156 in FIG. 12 . In FIG. 13 , the tree datastructures are shown including remote tree 560, sync tree 568, and localtree 570.

Remote tree 560 represents a server state or the state of content itemsstored remotely from the client device (e.g., on a server of the contentmanagement system). Local tree 570 represents a file system state or thestate of the corresponding content items stored locally on the clientdevice. Sync tree 568 represents a merge base for the local tree and theremote tree. The merge base may be thought of as a common ancestor ofthe local tree and the remote tree or a last known synced state betweenthe local tree and the remote tree.

Each tree data structure (e.g., remote tree 560, sync tree 568, or localtree 570) may include one or more nodes. Each node may have one or morechild nodes and the parent-child relationship is represented by an edge.For example, remote tree 560 includes nodes 562 and 564. Node 562 is aparent of node 564 and node 564 is a child of node 562. Thisparent-child relationship is represented by edge 566. A root node, suchas root node 562, does not have a parent node. A leaf node, such as node564, does not have a child node.

Each node in a tree data structure may represent a content item (e.g., afile, document, folder, etc.). For example, root node 562 may representthe root folder associated with the content management system and node564 may represent a file (e.g., a text file named “Foo.txt”) located inthat root folder. Each node in a tree data structure may contain datasuch as, for example, a directory file identifier (“DirFileID”)specifying the file identifier of a parent node of the content item, afile name for the content item, a file identifier for the content item,and metadata for the content item.

As described above, a sync engine may determine that the server stateand the file system state of the client device are synchronized when all3 trees (e.g., remote tree 560, sync tree 568, and local tree 570) areidentical. In other words, the trees are synchronized when their treestructures and the relationships that they express are identical and thedata contained in their nodes are identical as well. Conversely, thetrees are not synchronized if the 3 trees are not identical. In theexample scenario illustrated in FIG. 13 , remote tree 560, sync tree568, and local tree 570 are shown as being identical and synchronizedand, as a result, the server state and the file system state aresynchronized.

Diffing Tree Structures—Delete/Add

FIG. 14 shows an example of tree data structures, in accordance withvarious embodiments. As with the tree data structures shown in FIG. 13 ,the tree data structures shown in FIG. 14 (including remote tree 572,sync tree 578, and local tree 580) may be stored at the client deviceand managed by a sync engine such as client synchronization service 156in FIG. 12 . In FIG. 14 , the tree data structures are shown.

FIG. 14 shows a scenario after a previously synchronized state, such asthe scenario illustrated in FIG. 13 , wherein additional actions areperformed on the content items represented in the trees to modify thecontent items such that the trees are no longer in sync. Sync tree 578maintains a representation of the previously known synchronized stateand may be used by the sync engine to identify the differences betweenthe server state and the file system state as well as generateoperations for the content management system and/or the client device toperform to converge so that the server state and the file system stateare synchronized.

For example, a user (the same user as the user associated with theclient device or a different user with access to the content item) maymake modifications to the “foo.txt” content item stored by the contentmanagement system. This content item is represented by node 574 inremote tree 572. The modification shown in the remote tree 572 is aremoval (e.g., a removal of the content item from a space managed by thecontent management system) or delete of the foo.txt content item. Thesemodifications may be performed, for example, on another client deviceand then synchronized to the content management system or performedthrough a web browser connected to the content management system.

When the change is made on the content management system, the contentmanagement system generates modification data specifying the change madeand transmits the modification data to the sync engine on the clientdevice. For example, using a push model where the content managementsystem may transmit or “push” changes to the client device unilaterally.In other implementations, a pull model where the server sends thechanges in response to a request by the client device. Additionally, ahybrid model involving a long pull where the client device initiates therequests but keeps the connection open for a period of time so thecontent management system can push additional changes as needed whilethe connection is live. The client synchronization service updates theremote tree representing the server state for the content items storedby the content management system based on the modification data. Forexample, in remote tree 572, node 574 representing the foo.txt contentitem is shown as deleted.

The sync engine may identify a difference between remote tree 572 andsync tree 578 and, as a result, determine that a modification of thecontent items at the content management system has caused the serverstate and the file system state to no longer be in sync. The sync enginemay further generate and execute a sequence of operations for thecontent items stored on the client device that are configured toconverge the server state and the file system state so that they will bein sync.

Additionally or alternatively, a user (the same user as the userassociated with modifications at the content management system or adifferent user with access to the content item) may make modificationsto the content items stored locally on the client device that areassociated with the content management system. For example, the user mayadd a folder “/bar” to the “/root” folder and add a “Hi.doc” document tothe “/bar” folder.

When the change is made on the client device, the client device (e.g.,client synchronization service 156 or client application 152 of FIG. 1 )generates modification data specifying the change made. The sync engineupdates the local tree representing the file system state for thecontent items stored on the client device based on the modificationdata. For example, in local tree 580, node 582 and node 584 are shown asadded. Node 582 and node 584 represent the “/bar” folder and the“Hi.doc” document respectively.

The sync engine may identify a difference between local tree 580 andsync tree 578 and, as a result, determine that a modification of thecontent items at the client device has caused the server state and thefile system state to no longer be in sync. The sync engine may furthergenerate a sequence of operations for the content items stored by thecontent management system that are configured to converge the serverstate and the file system state so that they will be in sync. Thissequence of operations may be transmitted to the content managementsystem for execution.

As seen in FIG. 14 , modifications to content items stored on the clientdevice and content items stored by the content management system mayoccur at substantially the same time or within a particular time period.These modifications can be reflected in the tree data structures andused by the sync engine to generate sequences of operations for theclient device and for the content management system in parallel. Inother scenarios, however, modifications may not necessarily occur withinthe same time period and sequences of operations may be generated in anas-needed manner. Furthermore, although FIG. 14 illustrates scenariosfor adding content items and deleting content items, other types ofmodifications such as, editing, renaming, copying, or moving contentitems are also supported.

According to various embodiments, identifying a difference between twotree data structures and generating operations may involve checking eachnode in both tree data structures and determining whether an action hasbeen performed on the node. The actions may include, for example, theaddition of the node, the deletion of the node, the editing of the node,or the moving of the node. These actions may then be used to generatethe sequence of operations configured to converge the server state andthe file system state.

For example, if the two tree data structures are a sync tree and aremote tree, the sync engine may identify each node in the sync tree by,for example, requesting the file identifiers of all nodes in the synctree. For each node or file identifier for the node in the sync tree,the sync engine may determine if the node or file identifier is also inthe remote tree. A node or file identifier in the sync tree that is notfound in the remote tree may indicate that the node has been deletedfrom the server state that is represented by the remote tree.Accordingly, the sync engine may determine that a delete action hasoccurred on the remote tree. If the node or file identifier for the nodeis found in the remote tree, the sync engine may check whether the nodein the remote tree has been edited or moved.

To determine whether the node in the remote tree has been edited withrespect to the node in the sync tree, the sync engine may compare themetadata for the node in the sync tree with the metadata for thecorresponding node (e.g., the node with the same file identifier) in theremote tree. The metadata may include information that may be used todetermine whether the content item represented by the node has beenedited. For example, the metadata may include one or more hash valuesthat are generated based on the data in the content item or a portionthereof. The metadata may additionally or alternatively include a sizevalue, a last modified value, or other value for the content item. Themetadata for the node in the sync engine may be compared with themetadata for the node in the remote tree. If the metadata do not match,an edit of the content item may have been edited in the server staterepresented by the remote tree. Accordingly, the sync engine maydetermine that an edit action has occurred for the node on the remotetree. If the metadata matches, no edit may have occurred.

To determine whether the node in the remote tree has been moved, thesync engine may compare the location for the node in the sync tree withthe location for the corresponding node (e.g., the node with the samefile identifier) in the remote tree. The location may include, forexample, a path where the node is located, a file name, and/or adirectory file identifier (“DirFileID”) specifying the file identifierof the node's parent. If the locations match, no move may have occurred.On the other hand, if the locations do not match, a move of the contentitem may have occurred in the server state represented by the remotetree. Accordingly, the sync engine may determine that a move action hasoccurred for the node on the remote tree.

To determine whether a node has been added to the remote tree, the syncengine may identify any nodes or file identifiers in the remote treethat are not found in the sync tree. If a node or file identifier isfound in the remote tree and not found in the sync tree, the sync enginemay determine that an add action of this node has occurred on the remotetree representing the server state.

Although the example above is described with respect to the sync treeand the remote tree, in other embodiments, a similar process may occurwith the sync tree and a local tree in order to identify a differencebetween the sync tree and the local tree and determine which actionshave occurred on the local tree representing the file system state.

General Synchronization Using Trees

FIG. 15 shows an example method for synchronizing a server state and afile system state using tree data structures, in accordance with variousembodiments of the subject technology. Although the methods andprocesses described herein may be shown with certain steps andoperations in a particular order, additional, fewer, or alternativesteps and operations performed in similar or alternative orders, or inparallel, are within the scope of various embodiments unless otherwisestated. The method 590 may be implemented by a system such as, forexample, client synchronization service 156 of FIG. 12 , running on aclient device.

The system is configured to identify a difference between a remote treerepresenting a server state for content items stored by the contentmanagement system, a local tree representing the file system state forthe corresponding content items stored on the client device, and a synctree representing a known synced state between the server state and thefile system state. Based on these differences, a sequence of operationsmay be generated that, if executed, are configured to converge theserver state and the file system state towards a synchronized statewhere the three tree data structures would be identical.

For example, at operation 592, the system may receive modification datafor content items stored by a content management system or on a clientdevice. The modification data may be used to update a remote tree or alocal tree at operation 594.

The modification data specifies what changes occurred to one or morecontent items associated with a content management service. Accordingly,the modification data may be received from the content management systemor from the client device (e.g., from client application 152 running onclient device 150 in FIG. 1 ). Modification data received from thecontent management system may be referred to as server modificationdata. Server modification data specifies what changes are done to one ormore content items by the content management system and may be used toupdate the remote tree at operation 594. Modification data received fromthe client device may be referred to as client modification data. Clientmodification data specifies what changes are done to one or more contentitems on the client device and may be used to update the local tree atoperation 594.

At operation 596, the system may determine whether a server state forcontent items stored by the content management system and a file systemstate for the content items stored on the client device are in sync.Because the local tree and the remote tree are representative of thefile system state and the server state and are continually being updatedto track changes that occur at the content management system and theclient device, determining whether the server state and the file systemstate are in sync may be done by comparing the local tree and/or theremote tree to the sync tree to find differences between the trees. Thisprocess of finding differences between the trees is sometimes referredto as “diffing” the trees.

According to some embodiments and scenarios, determining whether theserver state and the file system state are in sync may include one ormore of identifying differences between the remote tree and the synctree and/or identifying differences between the local tree and the synctree. Differences between the remote tree and sync tree may indicate theoccurrence of changes to content items stored by the content managementsystem that may not be reflected at the client device. Similarly,differences between the local tree and sync tree may indicate theoccurrence of changes to content items stored at the client device thatmay not be reflected at the content management system.

If there are no differences between the trees, the server state and thefile system state are in sync and no synchronization actions are needed.Accordingly, the method may return to operation 592 and await newmodification data. On the other hand, if differences are detected, thesystem may generate a sequence of operations configured to converge theserver state and the file system state at operation 598.

The sequence of operations generated depends on the one or moredifferences that are detected. For example, if the difference betweentwo trees is an added content item, the generated sequence of operationsmay include retrieving the added content item and adding it. If thedifference between two trees is a deletion of a content item, thegenerated sequence of operations may include deleting the content item.The sequence of operations may also include a number of checks to ensuretree constraints are maintained. As will be described further below, thesequence of operations may conflict with the current state of the serverstate, the file system state, or other operations that are pendingexecution. Accordingly, the system may also resolve these conflictsbefore proceeding.

As noted above, if there are differences between the remote tree andsync tree, changes to content items stored by the content managementsystem may have occurred that may not be reflected at the client device.Accordingly, in this scenario, the system may generate a client sequenceof operations configured to operate on the content items stored on theclient device to converge the server state and the file system state andthis client sequence of operations may be provided to the client devicefor execution at operation 599.

Similarly, if there are differences between the local tree and synctree, changes to content items stored at the client device may haveoccurred that may not be reflected at the content management system.Accordingly, in this scenario, the system may generate a server sequenceof operations configured to operate on the content items stored by thecontent management system to converge the server state and the filesystem state and this server sequence of operations may be provided tothe content management system for execution at operation 599. In somecases, both cases may be true and a client sequence of operations and aserver sequence of operations may be generated and provided to theirintended recipients at operation 599.

Once the sequence(s) of operations are provided to the intendedrecipient(s), the method may return to operation 592 and await newmodification data. The sequence(s) of operations may provide one or moresteps towards the convergence of the server state and the file systemstate or provide all steps needed to sync the server state and the filesystem state. For example, the content management system may receive theserver sequence of operations and execute the server sequence ofoperations on content items stored by the content management system.This execution of the server sequence of operations causes changes tothe content items stored by the content management system, which aredetected and specified in server modification data, which is transmittedback to the system. The system may then update the remote tree anddetermine whether the server state and the file system state are insync.

The client device may receive the client sequence of operations andexecute the client sequence of operations on content items stored on theclient device. This execution of the client sequence of operationscauses changes to the content items stored on the client device, whichare detected and specified in client modification data, which is passedto the system. The system may then update the local tree and determinewhether the server state and the file system state are in sync. Theseoperations of method 590 may continue until the server state and thefile system state are in sync.

The operations of method 590 are described with respect to a client sideand a server side (e.g., a local tree and a remote tree, a file systemstate and a server state, a client sequence of operations and a serversequence of operations, client modification data and server modificationdata). In various embodiments the operations associated with the twosides may occur in parallel, in sequence, in isolation of the otherside, or a combination.

Rebasing

As described above with respect to FIG. 15 , differences between a synctree and a remote tree are identified and used to generate a clientsequence of operations configured to converge the server state and thefile system state. However, in some cases, the client sequence ofoperations may conflict with the current state of a local tree.Similarly, differences between the sync tree and the local tree areidentified and used to generate a server sequence of operationsconfigured to converge the server state and the file system state.However, the server sequence of operations may conflict with the currentstate of the remote tree. Additionally or alternatively, the clientsequence of operations and the server sequence of operations mayconflict with one another. Accordingly, various embodiments of thesubject technology provide additional technical improvements byresolving these conflicts.

For example, the client synchronization service may identify anoperation in a sequence of operations (e.g., the client sequence ofoperations or the server sequence of operations) that conflicts with arule. Each rule used to identify a conflict may also be associated witha resolution for the conflict. The client synchronization service mayupdate the sequence of operations based on the resolution for theconflict or resolve the conflict by performing operations associatedwith the resolutions for the conflict before providing the sequence ofoperations for execution.

FIG. 16 shows an example method 600 for resolving conflicts whensynchronizing a server state and a file system state using tree datastructures, in accordance with various embodiments of the subjecttechnology. Although the methods and processes described herein may beshown with certain steps and operations in a particular order,additional, fewer, or alternative steps and operations performed insimilar or alternative orders, or in parallel, are within the scope ofvarious embodiments unless otherwise stated. The method 600 may beimplemented by a system such as, for example, client synchronizationservice 156 of FIG. 12 running on a client device.

The system may receive a sequence of operations configured to converge aserver state and a file system state at operation 602. The sequence ofoperations may be, for example, the client sequence of operations or theserver sequence of operations generated and described with respect tothe method 590 of FIG. 15 .

At operation 604, the system identifies one or more violations in thesequence of operations based on a set of rules. The set of rules may bestored by client synchronization service 156 in FIG. 12 and specify anumber of constraints, invariants, or conflicts that need to beresolved. The set of rules are applied to the tree data structures andhelp control synchronization behavior. Each rule in the set of rules mayalso be associated or otherwise linked to a resolution to a violation ofthat rule. For example, the resolution may include an alteration of oneor more operations in the sequence of operations, a removal off one ormore operations, an addition of one or more operations, one or moreadditional actions to the server state or the file system state, or acombination of actions.

For each operation in a sequence of operations, the system may determinewhether any rule in the set of rules is violated. If a rule is violated,the system identifies a resolution of the violation and, at operation606, performs the resolution. The resolution may include actions such asmodifying one or more operations in the sequence of operations, aremoving or adding one or more operations, or additional actions on theserver state or the file state.

Once the resolution actions are performed, the system may generate aresolved or rebased sequence of operations based on the resolution andthe sequence of operations at operation 608 and, at operation 610,provide the resolved sequence of operations to the appropriate entityfor execution. For example, if the sequence of operations is a clientsequence of operations, the resolved sequence of operations may beprovided to the client device. If the sequence of operations is a serversequence of operations, the resolved sequence of operations may beprovided to the content management service. Additionally, the method 600of FIG. 16 may be performed on client sequence of operations and serversequence of operations in sequence, in parallel, or in various differentorders.

According to some embodiments, each type of operation may be associatedwith the same or a different set of rules. For example, operation typesmay include, for example, adding a content item, deleting a contentitem, editing a content item, moving a content item, renaming a contentitem, etc. The sequence of operations may consist of operations eachbelonging to one of the operation types above. Each operation type maybe associated with a specific set of rules.

For illustrative purposes, a set of rules for an “Add” operation typemay include rules such as file identifiers for content items must beunique in a tree (e.g., no two nodes in a tree may have the same fileidentifier), a directory file identifier (“DirFileID”) specifying thefile identifier of a parent node of the content item must exist in theopposite tree data structure, and a DirFileID and file name combinationfor a content item are not used in the opposite tree.

Opposite tree, as used here, refers to the tree data structure thatrepresents the state of the opposing entity. For example, a clientsequence of operations configured to operate on the client device andthe resulting changes to the file system on the client device will bereflected in the local tree. Accordingly, the opposite tree for theclient sequence of operations is the remote tree. Similarly, a serversequence of operations is configured to be transmitted to the contentmanagement system to be executed and the resulting changes to the serverstate will be reflected in the remote tree. Accordingly, the oppositetree for the server sequence of operations is the local tree.

FIG. 17 shows an example of tree data structures illustrating aviolation of a rule for an add operation, in accordance with variousembodiments. The tree data structures include remote tree 612, sync tree620, and local tree 626. When referencing the local tree 626, the remotetree 612 may be considered the opposite tree. On the other hand, whenreferencing the remote tree 612, the local tree 626 may be consideredthe opposite tree. FIG. 17 illustrates a sequence of operations addingthe content item represented by node 614 in remote tree 612. Forexample, a client synchronization service may compare remote tree 612with sync tree 620, identify the differences, and generate a sequence ofoperations that includes the addition of node 614. Node 614 isassociated with a FileID of 4, a DirFileID of 3 (which references parentnode 616, which is node 614's parent), and a file name of “Hi.” Parentnode 616 is associated with a FileID of 3, a DirFileID of 1 (whichreferences root node 618, which is node 616's parent), and a file nameof “Foo.”

The client synchronization service may perform the method 600 of FIG. 16and determine that the add operation for node 614 violates the “adirectory file identifier (“DirFileID”) of the content item must existin the opposite tree data structure” rule for “add” operation types.This is illustrated in FIG. 17 by the local tree 626 not having a nodewith a file ID of 3, which references parent node 616 of node 614. Thismay occur when, for example, after differences between remote tree 612and sync tree 620 are determined and a sequence of operations isgenerated, the “Foo” node corresponding to node 616 is removed from theopposite tree.

The resolution associated with this rule may include deleting the nodemissing from local tree 626 from sync tree 620 to synchronize sync tree620 and local tree 626 and rediffing (e.g., finding the differencebetween) remote tree 612 and sync tree 620. In the scenario illustratedin FIG. 17 , node 622 in sync tree 620 would be removed 624 and diffingoperations would commence to identify differences between remote tree612 and sync tree 620. This would result in the inclusion of an addoperation of node 616 as well as an add operation for node 614 in thesequence of operations.

Similarly, a violation of the “file identifiers for content items mustbe unique in a tree” rule for “add” operation types may be resolved byoperations including requesting, from the content management system, anew file ID for the node being added and using the new file ID whenadding the node. A violation of the “DirFileID and file name combinationfor a content item are not used in the opposite tree” rule for “add”operation types may be resolved by operations including checking via themetadata associated with the two nodes whether the content items are thesame. If the content items are the same, it is likely that the contentitem being added has already been added in other actions. If the contentitems are not the same, the file name for the content item being addedcan be renamed. For example, the file name for the content item beingadded can be appended with the text “(conflicted version).”

Organization Directory

As described above, FIGS. 2-3 introduce the data model of anorganization directory, such as organization directory 201. In order toachieve a goal of all user accounts having access to organizationdirectory 201, the data model includes several inventive accessprivileges such as traversal rights and view-name-only folders. FIG. 3further introduces the concept of restrictive access control list 147,which rather than providing access to a folder, instead indicates thatall user accounts other than those explicitly listed in restrictiveaccess control list 147 do not have access.

As described in FIGS. 4-6 , complexities introduced by the data model,and the nature of organization directory 201 wherein many user accountshave unique access rights to folders in organization directory, requirea robust authorization service 132 to determine whether user accountshave access to various folders, which folders, and what level of accessto the folders.

As described in FIGS. 7-17 , server synchronization service 112 can beused to interface with client synchronization service 156 to synchronizecontent management system 110 with client device 150 and vice versa.FIGS. 7-17 address basic synchronization mechanisms, however,complexities introduced by the data model, and the nature oforganization directory 201 wherein many user accounts have unique accessrights to folders in organization directory 201 can lead to furthersynchronization challenges, and management challenges. The followingdescription discusses these challenges and novel mechanisms foraddressing these challenges.

Mount Events

One of the challenges faced by content management system 110 in hostingand synchronizing organization directory 201 is that access to folderscan frequently change. However, since client synchronization service 156does not interface directly with access control lists 145, 147, it canbe difficult for client synchronization service 156 to learn aboutaccess changes.

Client synchronization service 156 interacts with server synchronizationservice 112, as described above, to receive messages regarding changesrecorded in server file journal 148. Accordingly, the present technologyprovides a mechanism by which server synchronization service 112 candetermine that access to a folder may have changed when serversynchronization service 112 reads from server file journal 148, and canthereafter interact with authorization service 132 to determine currentaccess permissions to the folder. Server synchronization service 156already interacts with authorization service 132 to determine currentaccess permissions to a folder after reading a mount revision fromserver file journal 148. Accordingly the present technology can takeadvantage of this existing mechanism by including duplicate mountrevisions in server file journal 148 when certain access permissions arechanged.

A duplicate mount revision is needed as opposed to generating a revisionthat merely informs that access permissions may have changed for afolder because some access changes can result in a user account beingable to view different content items after an access change. Forexample, the present technology supports more than just access changesfrom write capabilities to read capabilities, or read capabilities to noaccess. The present technology can also support access changes from readcapabilities to traverse or “view name only” capabilities, and suchchanges can require deletion of content items in addition to the changein access to a folder.

For example as seen in FIG. 18 , prior to an access change, financefolder 206 is a team-shared folder that is visible to all user accountsassociated with organization directory 201. Accordingly Member 1 canview finance folder 206 and its content items 223 on client device 150.However, after the access change where finance folder 206 has become aconfidential folder where user accounts other than those on the financeteam can only see the existence of the folder (view-name-only rights).Accordingly, after the access change, Member 1 can only see a folderrepresenting finance folder 206 on client device 150.

The change is more than locking finance folder 206 so Member 1 cannotsee the contents inside of it. Prior to the access change content items223 were stored on client device 150, and the change in access requiresthat these content items be removed from client device 150. One way toaccomplish this is to tell user account of Member 1 on device 150 tounmount finance folder 206, which can delete finance folder and all ofits contents. Thereafter, finance folder 206 can be remounted, andauthorization service 132 can inform server synchronization service 112to mount finance folder 206 for Member 1 with read-name-only access.Synchronization service 112 can then inform client device 105, havingaccess to the user account for Member 1, that an empty folder—finance206—has been mounted. Client device 105 does not learn of the existenceof content items 223 since these content items are not sent to clientdevice 150 and client device 105 does not store them.

For access changes that do not affect the content items stored on aclient device, such as a change from a read permission to a writepermission, a duplicate mount entry in server file journal 148 is notnecessary. Only the change in access needs to be added to the Auth tokenin the cursor and synced down to client device 105.

FIG. 19 illustrates an example method for determining when a duplicatemount should be written to server file journal 148. FIG. 20 illustratesan example access matrix 680 showing a previous access state in the leftcolumn and a new access state in the top row, and the necessary mountactions needed to transition from the previous access state to the newaccess state.

The method illustrated in FIG. 19 begins when content management system110 detects (650) a change in access for any user account to a folder.Content management system 110 determines (652) if the access state is a“no access” state, and if the new access state is “no access” then anunmount revision 654 is written into server file journal 148 for thatfolder.

If the access change resulted in some access state other than “noaccess,” then content management system 110 determines (656) theprevious access state for the namespace including the folder (the targetnamespace) for which the access state has changed, and can compare (658)new access state for the folder with previous access state.

If there is no record (660) of previous access for the target namespace,this means that the folder needs to be mounted, and a mount revision(662) is written to server file journal 148.

If there is a record (660) of previous access for the target namespace,and the previous access was a traverse access (664) than a duplicatemount (666) consisting of an unmount revision followed by a mountrevision is written to server file journal 148 for the target namespace.

As noted above unmounting the target namespace will cause client device150 to delete the target namespace and all content items within thetarget namespace, and the subsequent mount of the target namespace willcause client device 150 to receive only the content items to which theuser account of client device 150 has access.

If previous access to the target namespace was not traverse access, thencontent management system 110 can determine if the previous access tothe target namespace was read-name-only access (668). If the previousaccess to the target namespace was read-name-only access than aduplicate mount (670) consisting of an unmount revision followed by amount revision is written to server file journal 148 for the targetnamespace.

If previous access to the target namespace was not a traverse access orread-name-only access, then previous access was a read or write access(672), and content management system 110 can determine (674) whether thenew access is a partial access such as read-name-only access or traverseaccess. If the new access is read-name-only access or traverse accessthan a duplicate mount (676) consisting of an unmount revision followedby a mount revision is written to server file journal 148 for the targetnamespace. If the new access is not read-name-only access or traverseaccess than access change is from read to write access, or write to readaccess, which only requires a change of the read/write permission in thecursor for that namespace and sending the new cursor to the client toupdate the permissions. Note that a mount or duplicate mount is notrequired in this instance because the content items stored on clientdevice 150 are not changing due to the access change.

Inheritance Propagation/Traversal Path Determination

Some access changes will affect folders above or below the folderreceiving the access change in the file path. For folders that aresubordinate to the access change, this is not a problem as accesspermissions will be inherited down the path unless another namespaceexists subordinate in the path. Since namespaces never inherit accesspermissions and they have their own access permissions, changes toaccess permission higher in path shouldn't affect the namespace. Thuswhen access changes to a folder in a path, subordinate content itemswill end up with the proper access permissions using the methoddiscussed above with respect to FIG. 19 .

However, when access changes for a folder in a path, this can haveconsequences for folders higher in the path. FIGS. 21A and 21Billustrates an example of a need to propagate access changes up a path.FIG. 21A illustrates a path: “/root/bar/foo/baz/destination” before andafter an access change. As explained with respect to FIG. 5 , the userhas explicit permissions to access “/destination” 358, but does not haveexplicit access to confidential folder “/bar”, and instead has traversalrights to “/bar”, “/foo” 354, and “/baz” 356.

As illustrated in FIG. 21A, the access change removed folder 358“/destination”—e.g., this folder was deleted or unmounted. Merelydeleting folder 358 would still leave the user with traversal rights tofolders 354 and 356, but this is not desired since the user account'saccess to folder 358 was the basis for the traversal rights to folders354 and 356. Therefore, whenever access to a folder is changed in a pathwhere at least one folder higher in the path has traversal rights,access rights for each folder needs to be determined and changedaccordingly as addressed with respect to FIG. 22 .

FIG. 21B illustrates the opposite action from that illustrated in FIG.21A. FIG. 21B illustrates a path: “/root/bar/foo/baz/destination” beforeand after an access change. In FIG. 21B a user account does not haveaccess to “/bar”, “/foo” 354, “/baz” 356 and “/destination” 358 prior tothe access change since “/bar” is a confidential folder to which theuser does not have access, and “/foo” 354, “/baz” 356, and“/destination” 358 all inherit access privileges from “/bar”. After theaccess change the user appears in the restrictive access control listfor “/destination” 358, which requires that the user account have atleast traversal rights to “/bar”, “/foo” 354, and “/baz” 356.

As illustrated in FIG. 21B, the access changed to folder “/destination”358—e.g., this folder was added or mounted. Attempting to mount folder358 results in an error when a client device attempts to synchronize,because client device 150 would receive an instruction to mount“/destination” 358 in a folder to which it is unaware. Therefore,whenever access to a folder is changed in a path where at least onefolder higher in the path is a confidential folder, access rights foreach folder higher in the path need to be determined and changedaccordingly as addressed with respect to FIG. 22 .

In some embodiments in association with writing an unmount or mountrevision for a folder to server file journal 148, content managementsystem 110 can determine if access rights to other folders in the pathof the folder receiving the unmount or mount revision need to be revisedto account for changes in traversal rights to folders in the path. FIG.22 illustrates an example process for determining whether a traversaldictionary needs to be updated to reflect updated traversal rights forany folders in a path containing a folder having an access change. Insome embodiments, a traversal dictionary can be a database stored inmetadata database 146 listing all traversal paths for a user account. Insome embodiments, a traversal dictionary can be metadata stored inmetadata database 146 that is associated with each folder and list anext subordinate folder for which a user account has traversal rightsand identifying the folder at the end of the path which provides theneed for the traversal right. For example in FIG. 21B “/bar” wouldinclude “{/foo: [/destination]}”, and “{/baz: [/destination]}” in itstraversal dictionary, where “/foo”, “/baz” are the folders for which theuser account has traversal rights, and “[/destination]” provides theneed for the traversal right. Each folder in the path can be associatedwith a similar metadata.

The example process begins by retrieving (686) the path for the folderhaving an access change from mount table 380 (e.g.“/root/bar/foo/baz/destination” in FIGS. 21A and 21B). Contentmanagement system 110 can determine (688) whether any folders in thepath are confidential folders (e.g. “/bar” in FIGS. 21A and 21B). If nofolders in the path are confidential folders the process is complete(693).

If a folder in the path is a confidential folder then the process candetermine (690) for a specific user account whether that user accounthas gained access or lost access. If the specific user account has lostaccess to the folder having an access change (e.g., folder“/destination” 358 in FIG. 21A), then content management system 110 canremove from the traversal dictionaries (692) any folders in the path forwhich the traversal right comes from “[/destination]” (e.g., “/bar”,“/foo”, “/baz”). If the specific user account has gained access to thefolder receiving an access change (e.g., folder “/destination” 358 inFIG. 21B) then content management system 110 can determine (694) thespecific user account's access rights to the next superordinate folder(e.g., folder “/baz” 356 in FIG. 21B) in the path by determining (696)whether the specific user account previously had access to thesuperordinate folder (e.g., folder “/baz” 356 in FIG. 21 ).

If content management system 110 determines (696) that the specific useraccount did not previously have access to the superordinate folder(e.g., folder “/baz” 356 in FIG. 21B) then the path to the superordinatefolder (e.g., “/root/bar/foo/baz/”) can be added (698) to the traversaldictionary for that folder for the specific user account. If there is anext superordinate folder (e.g., folder “/foo” 354 in FIG. 21B) (699)then actions 694, 696, 698 can be repeated. If there is not a nextsuperordinate folder (699) then the process is complete (693). In someembodiments the traversal dictionary updating process (actions 694, 696,698) can also be complete (693) when a traversal dictionary for anyfolder in the path does not need to be changed in response to the newaccess rights gained (690).

Also, if content management system 110 determines (696) that thespecific user account previously had access to the superordinate folder(e.g., when the process determines previous access rights to “/root” ifFIG. 21B) then the process is complete (693) since the user accountalready has access, access does not need to be further granted.

File System Warnings

One of the challenges of synchronizing content management system 110with client device 150 which has its own file system, is that contentmanagement system 110 may support more advanced and more complexbehaviors than those available on client device 150. This createsopportunities for a user to perform actions that may seem routine onclient device 150, but that are not allowed by content management system110, or that will result in undesirable outcomes in content managementsystem 110. For example, if a user operating client device 150 deletescontent from a team-shared folder using client device 150 the user maybe intending to only remove the content from their client device,however the deletion would be synchronized to content management system110 and result in deleting the content item for all users with rights tothe team-shared folder. In another example, the user operating clientdevice 150 may attempt to delete a team-shared folder on their clientdevice, but only an administrator working in an appropriate managementinterface can delete a team-shared folder, and therefore this operationis not allowed. Another challenge is that some client devices performthe same action differently depending on the operating system they run,but content management system 110 desires to perform actionsconsistently. For example, if a user tries to move a read-only folder,some operating systems may make a copy of the folder and place the copyin the destination, while other file systems do not allow a read-onlyfolder to be moved.

The present technology provides file system warnings engine 707 that candeal with actions performed by a user that may result in an undesirableoutcome or an action that is not allowed. File system warnings engine707 can provide informational messages to a user after performingcertain actions and alert the user that the action is either not allowedor confirm that the user intends the potentially undesirableconsequences of the action.

FIG. 23 illustrates a system diagram showing components of contentmanagement system 110 that interact to provide file system warnings toclient devices 150. Content management system 110 includes serversynchronization service 112, which is described throughout thisdescription and interacts with client synchronization service 156 tosynchronize content item events taking place on client device 150 withcontent management system 110, and vice versa. Server synchronizationservice 112 can write certain data applying to an event coming fromclient synchronization service 156 to rules cache 705 and can notifyfile system warnings engine 707 of the event. File system warningsengine 707 can examine the data supplied by server synchronizationservice 112 in rules cache 705 to determine whether a warning isappropriate or not. When server synchronization service 112 determinesthat a warning should be sent, server synchronization service 112 caninteract with notification service 117 to send a file system warnings toclient device 150.

FSW Rule Engine

File system warnings engine 707 can detect many different actions thatcan have undesired consequences or actions that are not allowed and forwhich it would be desirable to warn or inform the user of theconsequences. Each of these actions can have a warning tailored to thespecific action. In some embodiments, the warnings can even be specificto the method of access utilized by the client device (e.g., access viasync engine, access via mobile application, access via web browser,access via third-party application, access through administrator contentmanager tool, etc.). As such there can be many different warnings, andeach are tailored to specific warning criteria.

The number of warnings and associated permutations of possible criteriacreate several challenges. First, having so many rules can createperformance challenges. In order to provide an acceptable userexperience the warnings need to appear shortly after the offendingaction has occurred. Additionally, making multiple queries to serversynchronization service 112 to identify criteria to determine whether afile system warning has been triggered can also impact synchronizationperformance. Furthermore, file system warnings engine 707 can becomecomplex if rules are nested within each other to minimize calls toserver synchronization service 112. Nested rules make updating orchanging rules or adding rules more challenging.

The present invention addresses each of these challenges by initiallyhaving server synchronization service 112 provide some foundationalinformation and write it to rules cache 705. Thereafter, file systemwarnings engine 707 can refer to rule cache for information alreadyprovided, or request new information as needed from serversynchronization service 112. Importantly, each item of information onlyneeds to be obtained once and stored in rules cache 705. Since each itemof information only needs to be obtained once, each rule can be writtenin a modular fashion, and need not be dependent on any other rules. Eachrule can be evaluated separately by evaluating information stored inrules cache 705.

FIG. 24 illustrates example actions and queries performed by serversynchronization service 112 and file system warnings engine 707. Whenserver synchronization service 112 receives a synchronization event, itcan synchronize (710) the event as described herein. In addition tohandling synchronization activities with respect to the event, serversynchronization service 112 can determine basic information describingthe event such as if the event involves a move event (712), a writeevent (714) of a new content item, a deletion (716), or a rename event(718), and can record the determined event along with any paths (720)relevant (origin path and destination path, as applicable) to thedetermined event to rules cache 705. Server synchronization service 112can then notify file system warnings engine 707 of an address at rulescache 705 where the basic information pertinent to the event has beenrecorded.

After learning of the event from server synchronization service 112,file system warnings engine 707 can begin to investigate (726)individual warning rules. For each rule, file system warnings engine 707can look up information pertinent to the event that has been recorded atthe given address in rules cache 705 to determine if the individualwarning rule applies.

As part of investigating (726) an individual warning rule, file systemwarnings engine 707 may determine that additional criteria that is notstored in rules cache 705 is needed and can request this informationfrom server synchronization service 112. For example file systemwarnings engine 707 can request to learn criteria such as whether theevent pertains to a content item that is file or folder (728), whetherthe content item is a placeholder content item or is a folder thatcontains a placeholder content item (730), how many content items afolder contains (732), whether a folder is in a top level of anorganization directory (734), whether the folder is a team-shared folder(736), whether a folder is a root of a namespace (739), whether a folderis a shared folder (738), what permissions are associated with a folder(740), and whether the user causing the event is logged-in as anadministrator (742). Note that the queries and actions to determine thecriteria listed in FIG. 24 may not be listed in any particular order,and there may be more or less queries and actions that those shown.

In some embodiments, only a partial set of the example queries andactions need to be performed before an applicable rule is determined.For example, many of the queries only pertain when the content item is afolder. As such when it is determined that the content item is a file itis not necessary to perform additional queries.

In some embodiments, the individual rules can be investigated in series.In such embodiments file system warnings engine 707 need only performrelevant queries and actions to determine whether the specific ruleapplies. Criteria derived from to the relevant queries and actions arerecorded in rules cache 705 at the address pertinent to the event. Whena subsequent rule is analyzed, file system warnings engine 707 can firstdetermine whether relevant queries and actions have already beenanswered and recorded in rules cache 705, thereby eliminating the needto request such information from server synchronization service 112.

FIG. 25 illustrates a table including descriptions of some example filesystem warnings. The table illustrated in FIG. 25 does not represent acomplete listing of all file system warnings, rather the file systemwarnings listed are merely representative of some file system warnings.

The warnings presented in FIG. 25 reflect events recorded on clientdevice 150 wherein the user has performed an action using the nativefile system of client device 150. Since the native file system of clientdevice 150 is unaware of many rules pertaining folders and content itemsat content management system 110, client device 150 will often allow theactions to take place. However when client device 150 attempts tosynchronize with content management system 110, synchronization service112 rejects the changes from client device 150 and informs clientsynchronization service 156 to undo the action. Accordingly correctivesolutions for actions taking place through the native file system ofclient device 150 sometimes require undoing the user action.

Example warning 750 pertains to an attempt by a user to delete theiruser account folder. However, only the administrator using theadministrator console may delete a user account folder. Accordinglywarning 750 will alert the user that they are not allowed to deletetheir user account folder and they will receive a notification thatdeletion will be undone.

Warning 752 pertains to an attempt by a user to move a confidentialfolder to a non-confidential folder. Such an action is not allowedbecause this action would potentially allow information that is intendedto be confidential to become public. Warning 752 can be accompanied byan option to undo the move or invite the user to change access to theconfidential folder.

Warning 754 pertains to an attempt by a user to add new content to ateam-shared folder. This warning is merely an informational warning toalert the user that the new content item will be shared with everyoneassociated with the team-shared folder. FIG. 26A illustrates an exampleof warning 754 presented on local file system of client device 150, andFIG. 26B illustrates an example of the version of warning 754 for clientdevice 150 accessing content management system 110 using a mobileapplication.

The example warning illustrated in FIG. 26A warns the user that acontent item saved to the team-shared folder will be accessible toeveryone at the organization, and gives the user the option to proceedwith saving the content item to the team-shared folder or to save thecontent item to the user account's folder. The example warningillustrated in FIG. 26B is similar to the warning in FIG. 26A exceptthat in the mobile application the user is only given the option tocontinue with saving the content item to the team-shared folder or tocancel the action.

Warning 756 pertains to an attempt by a user account that hasadministrator privileges, but the administrator is not using anadministrator console. The administrator has attempted to delete afolder from the organization directory using the file system of clientdevice 105 but an administrator can only delete a folder from theorganization directory when they are using the administrator console.Warning 756 gives the administrator the option to undo the action or tolaunch the administrator console. As will be addressed below, manyadministrator actions are only permitted through the administratorconsole to ensure that the administrator does not take inadvertentactions.

Warning 758 pertains to an attempt by a user to delete an on-demandcontent item. On demand content items appear as content items on clientdevice 150 but are actually placeholder content items that whenselected, are downloaded from content management system. When a userattempts to delete an on-demand content item it is often for the reasonthat the user is trying to clean up storage on client device 150.However since the content item is an on-demand content item and does nottake up space in storage on client device 150, deleting the on-demandcontent item will not have the desired effect. Additionally, deleting anon-demand content item will often have undesired effect of removing thecontent item from the users account. Warning 758 informs the user thatthe content item is an on-demand content item and that the deleting thecontent item removes the item from the user's account and gives the useran option to continue with the deletion or cancel.

Warning 760 pertains to when a user account attempts to delete 100 ormore content items. This warning is triggered by what is usuallybelieved to be an inadvertent deletion, and warns the user that thecontent items are to be deleted and gives the user the option tocontinue with the deletion, cancellation, or make the content itemson-demand content items to save space on storage of client device 150.

Warning 762 pertains to when a user account attempts to unmount a sharedfolder. Warning 762 warns the user that un-mounting of the shared folderwill delete the folder from the user's account but that it will remainaccessible to everyone else to which the folder has been shared, andgives the option to continue, to cancel the unmount, or to learn moreabout the behaviors of shared folders.

As may be apparent from FIG. 25 , some warnings operate to alert theuser that a particular action is not permitted, e.g. warnings 750, 752,etc., while some warnings are conformational warnings that operate toinform the user of potential undesirable consequences, and give theoption to continue (confirm the action) or to cancel, and sometimes toreceive more information on the topic. In some embodiments, the user maybe given an option to request to not see warnings pertaining to aspecific type of action again. In some embodiments, option may onlyapply to conformational warnings and not alerts regarding disallowedactions.

File system warnings engine 707 also includes warnings pertinent toactions taking place on client device 150 when it is operated in othercontexts (e.g., using mobile application, using web interface, etc.).When actions take place in other contexts then the local file system ofclient device 150 the solutions provided with warnings may not requireactions to be undone but instead can notify a user that the actionfailed. Failing actions is possible in these contexts because thesecontexts are specific in function to use with content management system110.

For example, FIG. 26C illustrates an example warning in a mobileapplication where a user has attempted to move a folder from ateam-shared folder, and the user is informed that the move has failed.This warning is similar to warning 764 in FIG. 25 , but warning 764 isspecific to an action taking place on the file system of client device150. In warning 764 the user is given additional options such as to undothe move or to launch an interface to change access options toteam-shared folder (assuming the user has such privileges).

Batching of Warnings

In some embodiments a single user action may trigger a plurality of filesystem warnings. For example, if the user attempted to move multiplefolders, or multiple content items, each individual move may trigger afile system warning. In another example, a user may be working off-linefor a period of time making many changes and upon reconnecting tocontent management system 110, the user may trigger a plurality of filesystem warnings. Sending the user a flood of file system warnings wouldnot provide a good user experience. Accordingly, the present technologyprovides for a mechanism of batching file system warnings as illustratedin FIG. 27 .

File system warnings engine 707 can determine (770) a first notificationto send to a user operating client device 150 and inform notificationsservice 117 of the first notification. Instead of immediatelydispatching the first notification to client device 150, notificationservice 117 may briefly delay dispatching a first notification todetermine (772) if there are additional notifications. In someembodiments the delay can be up to one second. If an additionalnotification arrives within the delay, a further delay of up to onesecond can occur.

If there are no additional notifications then the first notification canbe dispatched (780) to client device 150. If additional notifications(772) arrive, notification service 117 can determine (774) if any of theadditional notifications are of the same type as the first notification.

If any of the additional notifications are of the same type (774),notification service 117 can batch (776) notifications of the same type,and then queue (778) notifications by their type. Thereafter,notification service 117 can send (780) a single notification of thefirst type to client device 150, and wait to receive (782) a response tothe notification, and apply (782) the response to all notifications ofthe same type. For example, if the first type of notification pertainedto moving content items into a team-shared folder, and the userresponded to allow the content to be added into the team-shared folderand be accessible to the entire team, the response (782) can be appliedto all notifications of that type. Thus, an assumption is made that theuser had the same intent for all of the content items to whichsubsequent batched notifications of that type pertain since all of theactions likely occurred in a relatively short period of time.

In some embodiments, the content items to which the batchednotifications pertain can all be merged into a single notificationrather than having the first notification that pertains to an individualcontent item be representative of the whole group.

After applying (782) the response to all notifications of the same type,notification service 117 can dispatch (784) a notification of the nexttype from the queue, and upon receiving a response (782) can apply theresponse to all notifications of that type. These actions can berepeated by notification service 117 until all queued notifications havebeen sent.

API being Aware of FSW

In some embodiments, a file system warnings application programminginterface (API) can be provided to third-party developers for inclusionin applications that interface with content management system 110. Thefile system warnings API can be especially useful in situations in whicha user performs an action using a third-party platform that is allowedby content management system 110, but may have unintended consequences,and a conformational warning would be helpful. However, if the filesystem warnings API were designed to require a response to aconformational warning prior to an action taking place, the performanceof the third-party platform may be unacceptable. Another challenge isthat third-party platforms may not support file system warnings, andsuch confirmatory responses cannot be a prerequisite to performing anaction.

The present technology addresses these challenges. When a user interactswith a third-party platform to perform an action in content managementsystem 110, the third party platform can send a communication, andcontent management system 110 can receive (790) the communication thatspecifies the action(s) to be performed on a specific content item(s),and the communication can optionally include a file system warning APIcall.

Whether or not the received (790) communication includes the file systemwarning API call, content management system 110 can still perform (792)the action, unless the action is prohibited. (If the action isprohibited, and third-party platform did not include a file systemwarnings API call, content management system can return an error.)

After performing (792) the action, or prohibiting the action, filesystem warnings engine 707 can determine (794) if the action requires afile system warning. If not, the process can end (800).

If it is determined (794) that the action requires a file systemwarning, file system warnings engine 707 can determine (796) if the filesystem warning is included in the list of file system warnings toignore. As addressed above, in some embodiments, a user may indicatethat some file system warnings do not need to be shown again in thefuture. In such embodiments, the third party platform can include codesthat identify specific types of file system warnings that either theuser or the third-party developer has determined do not need to bepresented.

Assuming the file system warning was not included (796) in a list offile system warnings to ignore, file system warnings engine 707 can send(798) the appropriate file system warning.

If the file system warning requires confirmation and file systemwarnings engine 707 receives (802) confirmation of the action, theprocess can end. However if file system warnings engine 707 receives(804) an undo instruction then file system warning engine 707 can takesteps to undo (806) the action. Should no response be received, theaction will remain completed.

Placing Shared Content within the Organization Directory

Providing an organization directory where some folders are accessible toall user accounts, but some folders are confidential can create somechallenges with respect to maintaining confidential content items asconfidential while also allowing user accounts a comfortable environmentthat operates as they expect when they take actions within theorganization directory. This is especially true in the organizationdirectory described herein that supports nested namespaces, restrictiveaccess control lists, traversal access rights, and view-name-only accessrights in addition to other more traditional access rights.

One challenge that can arise is in determining where a shared contentitem should be located within a first user account's directory. FIG. 29illustrates an example process by which content management system 110can determine where a content item shared by a second user accountshould be placed within the directory of a first user account.

The process can begin when content management system 110 receives (810)a shared content item from the second user account to be shared with thefirst user account. Content management system 110 can determine (812)whether the first user account has access to a folder containing theshared content item. For example, in FIG. 30A, content management system110 can determine (812) whether folder 356 containing shared contentitem 825 is accessible to the first user account. In FIG. 30A the firstuser account does not have access to folder 356 since it is aconfidential folder and the first user account does not appear inrestrictive access control list 147. In FIG. 30B the first user accountdoes have access to folder 356 since it is not a confidential folder.While in FIG. 30C the first user account does not have access to folder356 because the first user is not a member of the second user account'sorganization.

When it is determined (812) that the first user account has access tothe content item's location, content management system 110 can give thefirst user account access (814) to the content item at its current path.This outcome is illustrated in FIG. 30B, where the first user account isa member of the same organization as a second user account so they bothhave access to the organization directory. This is illustrated in FIG.30B where the second user has added shared content item 825 in theiraccount's directory in a folder that is not confidential. Content item825 has been explicitly shared with the first user account by includingthe first user account in an access control list to perhaps designatecontent item 825 as confidential or perhaps read only. Since the firstuser account already had access to folder 356, shared content item 825can be placed within, the first user account's directory 832 at the samepath to which it is located in the second user account's directory 830.

When it is determined (812) that the first user account does not haveaccess to the shared content item in its location, then contentmanagement system determines (816) whether the content item is locatedwithin an organization folder to which the first user account is amember. If so, then content management system 110 can locate the sharedcontent item 825 in the first user account's directory 832 at the samepath to which it is located in the second user account's directory 830and content management system 110 must also provide (820) traversalrights to be able to access shared content item 825 at its current path.For example, as illustrated in FIG. 30A, the first user account does nothave access to confidential folder 356 but since the first user accountis a member of the same organization as the second user account, thefirst user account can be given traversal rights to access sharedcontent item 825 at its present path. This also maintains the conditionthat every user account having access to an organization directoryshould access the same content item at the same path.

If, however, it is determined (816) by content management system 110that the first user is not a member of the organization from whichcontent item 825 has been shared, shared content item 825 can be placedin the user account's folder. This scenario is illustrated in FIG. 30C,which illustrates the first user account's folder 832 before receiving834 shared content item 825, and after receiving 836 shared content item825. Since the first user account does not have access to theorganization directory 830 from which content item 825 has been shared,content item 825 is located in user account's folder.

Prevention of Content Leaking

Another challenge in managing content management system 110 is that manyuser accounts can be making changes to content items at the same time.This causes a well known set of challenges wherein version conflicts forcontent items can result when two users try to submit edits to the samecontent item at the same time. Additionally, content management system110 also faces new challenges such as ensuring that content items thatare intended to be confidential do not inadvertently become public. Thiscan arise when, for example, one user account deletes a confidentialfolder, while another user account attempts to save a content item tothat confidential folder. Content management system 110 includes amechanism to ensure that content items that were intended to beconfidential, remain confidential.

FIG. 31 illustrates an example process for preventing confidentialcontent items from inadvertently becoming publicly available orinadvertently lost. The process begins when server synchronizationservice 112 receives (840) a synchronization event from client device150. For example, as illustrated in FIG. 32A, a user account has addedor edited content item 856, which is intended to be a confidentialcontent item stored within confidential folder 356. As addressed above,the synchronization event from client device 150 includes a cursor thatindicates the last revisions to a specified namespace (e.g., folder 356)that client device 150 is aware of Server synchronization service 112can determine (842) if the cursor is current (i.e., whether clientdevice 150 is up to date with the latest changes to the specifiednamespace). If the cursor is current (842), then the state of the serveris as reflected on client device 150, and server synchronization service112 can commit (save) the content item to content management system 110.

However, if the cursor is not current (842), then server synchronizationservice 112 can fail to synchronize (840) the synchronization event fromclient device 150, and instead sends (844) synchronization events toclient device 150 in order to update client device 150 to reflect thecurrent state of content management system 110.

In some embodiments, a synchronization event unmounts (846) a sharedfolder, which will cause client device 150 to delete the shared folder.FIG. 32A illustrates an example of when the client device directory 855includes folder 356, but the current state of the server 857 shows thatfolder 356 is no longer mounted, and therefore, client device 150 mustbe synchronized with content management system 110 by also deletingfolder 356.

However, this event could lead to several undesirable side effectsdepending on how client synchronization service 156 handles the unmountof folder 356. One undesirable side effect is that any content itemswithin folder 356, including those content items that have not yet beensynchronized to the server could be deleted as client device 150 deletesfolder 356 to become synchronized with client device 150. A user accountwould not have saved a new or revised content item to a directory theyknew would immediately be deleted. Fortunately, client synchronizationservice 156 does not delete content items in this manner. Instead serversynchronization service 112 informs client synchronization service 156of each individual content item that should be deleted so only contentitems that are known by the server and that are intended to be deletedby server synchronization service 112 and client synchronization service156 are deleted.

While this mechanism ensures that no new or unsynchronized content itemwill be deleted since server synchronization service 112 will be unawareof such content items and will not instruct for them to be deleted, itcan cause the side effect that a new or modified content item such ascontent item 856 can remain behind after the deletion and needs to besynchronized to the server.

One possible, but undesirable mechanism to synchronize content item 856to content management system 110 would be to attempt to add it as closeas possible to its original path. For example, if the server were to seecontent item 856 saved in a folder that does not exist (it was justdeleted) server synchronization service 112 would either create thefolder and content item, or just store the content item in the nextparent folder that does exist. This behavior would be reasonable, andprovide a possible solution except in the case that content item 856 isconfidential and these folders might not be confidential. This wouldcause a confidential content item 856 to be publicly available. This isreflected in FIG. 32B as a “state to avoid” 861.

To prevent this side effect of potentially allowing a confidentialcontent item to become non-confidential, client synchronization service156 moves (848) the unmounted folder 848 to the user account folder andconcurrently informs server synchronization service 112 that the folderhas been unmounted. (This is important so that the server does not seethe moved folder as something that needs to be synchronized up to theserver.) Now as client synchronization service 156 processes deletionevents (850) to delete the individual content items as instructed byserver synchronization service 112, unsynchronized content item 856remains behind, stored in the user account folder as shown in the “aftersynchronization” state 859 in FIG. 32A. Content item 856 can then besynchronized from client device 150 to content management system 110.

While content item 856 might not be in the location that a userintended, content item 856 was not inadvertently deleted, and it was notinadvertently made public as it now resides in the user account'spersonal folder that is not shared with others. Content item 856 canthereafter be moved to a new location if desired by the user account.

Restoring Access Control List Entries after Deletion

Even with the many safeguards provided by server synchronization service112 and client synchronization service 156 that act to prevent useraccounts from performing actions that are likely unintentional or thatmay have unintended consequences, there are some actions that users mayperform that they may later wish to undo. The present technologyprovides mechanisms for making undo actions easier. For example onechallenge that can be faced is when a folder, such as a confidentialfolder, that has customized access privileges provided by entries inaccess control list 145 or restrictive access control list 147, becomesdeleted. When a folder becomes deleted, so do those entries in accesscontrol lists 145 and 147. However, when a user or an administratorlater attempts to undelete or restore the deleted folder, this actiononly reconstructs the folder and content items within the folder fromblocks remaining stored in content storage 142. Undeleting or restoringof a deleted folder does not have analogous action for access controllists 145 and 147—that data is deleted and does not remain on disc.

To remedy this problem, content management system 110 can make copies ofaccess control list 145 and 147 modifications and store thesemodifications in metadata database 146 in association with a folderidentifier, which can be used to reconstruct access control list 145 and147 entries.

FIG. 33 illustrates an example process for deleting and restoring aconfidential folder. Server synchronization service 112 can receive(860) a synchronization event from client device 150 to delete theconfidential folder, and can then cause the confidential folder tobecome unmounted (862). In association with unmounting (862) theconfidential folder, all entries in access control lists 145 and 147pertaining to the confidential folder are deleted (864). Subsequentlyserver synchronization service 112 can receive a request (866) toundelete the confidential folder.

To restore the confidential folder, content management system 110 mustrestore (868) access control list entries by retrieving access controllist data from metadata database 146 and repopulate access control list145 and 147 entries. This must be done prior to providing any access toany user accounts otherwise all user accounts having access to a parentfolder will temporarily have access to the contents of the confidentialfolder. Content management system 110 can then reconstruct (870) theconfidential folder and server synchronization service 112 can instructclient devices 150 to also reconstruct (870) the confidential folder sothat it is restored (870) on both content management system 110 andclient devices 150.

Converting to Organization Directory

Thus far the present description has covered aspects of providing theorganization directory including access rights within the organizationdirectory, and interacting within the organization directory, amongothers. However all of these topics assume that organization directoryalready exists. The present technology also addresses a process forconverting user accounts from a single user account access model intoorganization directory access model.

For example, the present technology addresses challenges associated withmodifying or rebuilding directories such as ensuring that privatecontent items remain private, providing mechanisms for crash/failuretolerance, and efficiently synchronizing client devices 150 with contentmanagement system 110 after transitioning a user account to theorganization directory of content management system 110.

FIG. 34 illustrates an example method for converting a user account fromsingle user account 902 into organization directory 201. The processbegins when content management system 110 creates (880) a convert-usertask in metadata database 146. The convert-user task can be accompaniedby a list of operations to complete before the convert-user task can beconsidered complete. The convert-user task and list of operationstogether ensure that should the convert-user task fail at any point, theconvert-user task can be resumed from where it left off. After eachcompleted operation, the list of operations can be updated to remove thecompleted operation.

FIG. 35 illustrates an example transition from user account view 900before being switched to organization directory 201, and the same useraccount's view 212 after transition to organization directory 201.

User account view 900 shows a user account in a single user accountmodel, wherein root directory 902 stores unshared content items 904,shared folders 906, and group collections 908. In comparison,organization view 212 shows root organization directory 201 includinguser account folder 215, and team collections 204. User account folder215 is the only folder within organization directory 201 that is privateto the user account. All other folders are shared with at least oneother user account having access to organization directory 201.

Returning to FIG. 34 , after the convert-user task has been created(880), content management system 110 can receive the folder name for thenew user account folder 215 from team service 130. Content managementsystem 110 determines (883) whether any other folder in user accountview 900 is the same as the name supplied for new user account folder215. If the username already exists (883) then the folder within useraccount view 900 is renamed (884). Then, after ensuring that noduplicated folder will result, content management system can create(886) folder 215 having the name of the new user account folder and putall contents of root directory 902 into the folder 215 as seen inintermediate state 905 of organization directory 201 in FIG. 35 . All ofthe content items of directory 902 are put into folder 215 because 215is a private folder—this move is synchronized with client device 150 tobring client device into transitory state 905. By including the contentitems in private folder 215 this ensures that content items will defaultto an access state of being private to the user account in the eventthat the convert-user task does not explicitly move a content itemelsewhere.

Intermediate state of organization directory 905 shows user account rootdirectory 902 containing new user account folder 215 with all contentitems from user account root directory 902 from view 900 stored withinit.

The next step in the transition from user account directory 902 toorganization directory 201 is to mount (888) user account folder 215within organization directory 201 and declare organization directory 201as the root namespace for the user account.

All folders that are shared with other user accounts that have access toorganization directory 201 are unmounted (890) for those user accounts.This ensures that while Member 1's user account is being transitionedinto organization directory 201, that the interim changes and moves forthe folder are not synchronized to those accounts. The folder can beremounted after Member 1 has been transitioned to organization directory201. However, users that do not have access to organization directory201 will not experience the unmount of the shared folder since nochanges are happening to their account. For example folder 906 is sharedwith “user Z” whom does not have access to organization directory 201.Accordingly folder 906 is not unmounted for user Z. In contrast folder908 is shared with the marketing team, and the marketing team is a teamwithin the organization that has access to organization directory 201.Accordingly folder 908 is unmounted from the user accounts of allmembers of the marketing team.

Next any folders, such as team-shared folders, that have accesspermissions that restrict some members having access to organizationdirectory 201 from accessing the folder are marked confidential (892)and modifications are made to restrictive access control list 147.Thereafter all team-shared folders can be mounted (894) in organizationdirectory 201 and they already have appropriate access permissionsconfigured. This step converts folder 908 into team-shared folder 208 inorganization directory 201. In some embodiments other content items canbe moved out of user folder 215 and into other locations of organizationdirectory 201 as instructed by list of operations associated with theconvert-user task. In some embodiments content items can be selected tobe moved out of user folder 215 using the same decisions as discussedwith respect to FIG. 29 above.

After removing specified folders and content items out of user accountfolder 215 while directory 902 is in transitory state 905, the user hascompleted transitioning to organization directory 201 on the server. Anycontent items specified by the events associated with the convert-usertask have been moved out of account folder 215 such as marketingteam-shared folder 208. Other content items such as shared folder 906that is shared with a user account that does not have access toorganization directory 201 remains in user account folder 215 as isprivate content item 904. One of the benefits of transitioning toorganization directory 201 is that everyone with access to organizationdirectory 201 has access to a directory containing all of theorganization's content items. As such, FIG. 35 shows Member 1's view 212of organization directory 201 that includes team-shared collections 204that weren't previously associated with the user account.

Now that the transition from user specific account 902 to organizationdirectory 201 is complete on the server, content management system 110can send a synchronization notice (896) to client device 150.

In response to receiving the synchronization notice (896), client device150 sends it's copy of the cursor to the server which specifies thenamespaces of which it is aware that needs to be synchronized. However,due to the transition to organization directory 201, the serverrecognizes that client device 150 needs to to be transitioned toorganizations view 201, and can cause client device 150 to restart andmount new root of organization directory 201 and mount user accountfolder 215 within the root of organization directory 201.

Content management system 110 can also determine that client device 150is so out of date that providing individual synchronization events byproviding the linearized list of events from server synchronizationservice 112 would not be an efficient way of bringing client device 150into the current state, content management system 110 can instructclient device 150 to pause (898) client synchronization service 156.

Rather than bring client device 150 into synchronization with contentmanagement system 110 through the normal synchronization process, clientdevice 150 can be more efficiently brought up-to-date using a quickstart procedure.

Quick Start & Rebuilding Namespaces Views

Whether client device 150 is starting up for the first time and needingto synchronize organization directory 201, or it has been a long timesince client device 150 last synchronized with content management system110, it may be more efficient to rebuild a namespace then to synchronizeindividual events from content management system 110. In suchembodiments client synchronization service 156 can be paused while aquick start procedure is performed to efficiently bring client device150 up to date.

First content management system 110 determines a reasonably currentnamespace view for the user account, and there are two mechanisms bywhich content management system 110 can construct an up-to-datenamespace view without reading through an entire list of revisions fromserver file journal 148.

FIG. 36 illustrates an example process for constructing an up to datenamespace view by content management system 110. First contentmanagement system 110 can determine (920) a most efficient mechanism tocreate the namespace view.

A first method is to choose an arbitrary point in server file journalfrom which to read for the namespace, and to identify all paths in thenamespace at that point in time. As addressed above, server file journal148 is a collection of rows describing revisions to content items. Therows are organized by namespace identifiers and server file journalidentifiers. The combination of a namespace identifier and a server filejournal identifier (ns_id, sj_id) corresponds to a specific row inserver file journal 148 containing a specific revision within thenamespace that is identified. Content management system 110 can read(922) from server file journal 148 for a specific namespace ID at orbefore a recent row in server file journal 148. The revisions in serverfile journal 148 can be filtered by a latest tag, which identifies rowsin server file journal 148 as being the last revision to any specificpath. Accordingly, by reading all rows of server file journal 148 for aspecified namespace having the latest tag applied will yield a list ofrevisions that identify every file path for the specified namespace.These file paths can be extracted (924) from the server file journal 148entries and used to construct (928) a namespace view directorystructure.

The second method is to read from a snapshot service provided by contentstorage service 116, which stores condensed snapshots of a namespace incontent storage 142 at a recent point in time. The snapshot service isdescribed in more detail below, however, by way of introduction, thesnapshot service stores a condensed view of a namespace—including all ofthe content items in it—for a recent point in time. Large namespaces mayneed to be sharded over multiple pages, and shard page names can includea hash that identifies each file path stored on that shard page. Abenefit of storing path information in the shard names is that the shardpages don't need to be opened to extract file paths, and you can usefile path information to only open the shard page(s) you are looking forwhen using the snapshot service. Each snapshot is current for aparticular namespace at a specific server file journal ID (ns_id,sj_id).

Returning to FIG. 36 , file paths can be extracted (926) from thesnapshot service for a namespace, and these file paths are used toconstruct (928) a namespace view directory structure.

Content management system 110 can heuristically determine (920) whichmechanism is likely to be the most efficient mechanism. If the namespaceis not very active, and therefore there are not too many rows ofrevisions in server file journal 148 for any given content item, contentmanagement system may decide that the server file journal method ispreferred. If however the namespace is very active, or some other factorcauses content management system 110 to determine that it is moreefficient to read from snapshot service, that method can be used.

Both mechanisms result in using extracted file paths to construct (928)a namespace view directory structure for a particular point in time inthe past. In the server file journal method, content management systemreads entries from server file journal 148 at or before a particularserver file journal ID, and in the snapshot method, the paths wereextracted from a snapshot that was current as of a particular serverfile journal ID. Accordingly content management system 110 can bring thenamespace view into a more current state by processing revisions (930)stored in rows in server file journal 148 that are after the server filejournal ID that was used when paths were extracted from server filejournal entries or snapshot service as described above.

Now that the server has a current view of a particular namespace, thatview needs to be filtered for the user account requesting the namespaceview since, as described above, a given user account may not be able tosee every content item in a namespace. Content management system candetermine (932) access for the user account in the namespace usingprinciples described with respect to FIG. 4 above, and can filter (934)the constructed namespace view according to access permissions for theuser account. Content management system 110 can send (936) the filterednamespace view to client device 150 to construct a remote tree.

Client device 150 can update (938) its local tree to match the remotetree. When updating its local tree, creating new directories is mainly aprocessing task however; storing the content items can requiredownloading a large amount of data. Fortunately, any content itemsalready stored on client device do not need to be downloaded. Clientdevice 150 can recreate the content items from a block cache on clientdevice 150 that contains blocks for deleted content items and commentsfor the content items. Using those already downloaded blocks is moreefficient than downloading the blocks. However, any blocks not found inthe block cache need to be downloaded (942) from the server either fromthe snapshot service which can provide a compressed version of anamespace, or incrementally from content storage service 116.

The process illustrated in FIG. 36 can be repeated for each namespacemounted in organization directory 201.

Once client device 150 has mounted the appropriate tree structure, anddownloaded any compressed namespaces from the snapshot service, serversynchronization service 112 can send the latest cursor down to clientdevice 150 and can remove the convert-user task for the user account,which also allows the client synchronization service 156 to resume.

FIG. 37 illustrates an example of information used to construct Member1's view of organization directory 201. For any namespace, the namespaceview builder process described with respect to FIG. 36 can result inextracted paths for the namespace that are filtered according to Member1's access rights. FIG. 37 illustrates paths in the namespace for Member1's user account folder 215. This can be used to determine a directorytree for the namespace and this process can be repeated for eachnamespace.

Each namespace can be located within organization directory based oninformation from the mount table.

Snapshot Service

In some instances it can be useful to have a complete namespace allsaved together in one place. For example, in instances when an entirenamespace needs to be constructed, such as when a namespace is sharedwith a new account, or when a new client device is added to useraccount, or when transiting to organization directory—it can be moreefficient to download an entire namespace from one place instead ofreading each revision from server file journal 148 and using contentstorage service 116 to extract blocks making up a content item fromcontent storage 142.

To address this need, content storage service 116 can include a snapshotservice that stores namespace views at a point in time, or morespecifically, as of a server journal id (sj_id) for that namespace. Anamespace view is a highly compressed snapshot of the contents of anamespace at that namespace ID (ns_id). The snapshot includes all thecontents of a namespace, and is not filtered for a user account'spermissions, or hidden files, etc. Namespace snapshots might be so largethat the namespace need to be divided into pages. Each page can includerepresentations of a paths from within the namespace (a subset of thepaths that make up the namespace).

Since each page is compressed, it is preferable to avoid opening anypage on the server, where it would potentially utilize a large amount ofmemory. Accordingly, every path and prefix of the path can be hashed,and the hashes can be stored in the name of the snapshot page.Therefore, it is possible to search for the hash of a path withouthaving to open any page of the snapshot to find that path. Thisoptimization also works in reverse where the path names can be extractedfrom the snapshot pages to reconstruct a directory tree for a namespace.

To reconstruct a directory tree, the paths can be topologically sorted(parent_prefix_hash→path_hash). The initial set of paths with nodependencies are the children of the root of the namespace, and then wecan reconstruct the full path (e.g., “/foo/bar/baz”) from the set ofpaths (e.g., “/foo,” “/foo”→“/foo/bar”, “/foo/bar”→“/foo/bar/baz”. Eachpath state along this set contains the last component of its path, e.g.“foo”, “bar”, “baz”.

As addressed above, the namespace snapshots are not filtered for useraccount access permissions. Instead, after constructing the directorytree from the namespace, the paths in the directory tree can be filteredaccording to user account access permissions. User account accesspermissions can be obtained as described with respect to FIG. 4 , above.Then each path to which the user account has access can be designated asallowed, e.g., represent the set of filters as follows:

-   -   ALLOW_ONLY (hash1, hash2, hash3, . . . )    -   ALLOW_MOUNT (hash4, hash5, . . . )

each hash containing full path hashes.

If a filter is specified, content storage service can filter the pathsout at runtime without doing a full topological sort, and thisespecially important because it only requires looking at data in asingle page of a snapshot to apply the filters to that page.

Organization Directory Content Manager

As referenced above, organization directory 201 can be managed by anadministrator accessing organization directory through an administratorconsole. FIGS. 38A, 38B, 38C, and 38D show example user interfaces ofadministrator console 950.

Managing organization directory 201 has several challenges, especiallyas pertains to diversity of content types (e.g., team content, useraccount collections, etc.), and a diversity of access points toorganization directory 201 (administrator console, clientsynchronization service, web access, mobile application, etc.). Anadministrator may have different capabilities depending on the type ofcontent, the access point, and administrator role, and it is necessaryto ensure that the administrator is aware of the role and permissionswith which the administrator is working to avoid unintentional changesto organization directory 201.

An administrator can have several types of access. First anadministrator can access organization directory 201 as a user, with nospecial privileges over any other user. In the user role, theadministrator has access to his/her respective user account collection,and can view the team-shared folders of the organization directory 201.

An administrator can have owner access. In the owner role, anadministrator can manage team-shared folders, including confidentialteam-shared folders. However, an administrator cannot access any useraccount collections (in some embodiments, administrator may haveread-name-only permissions). In some embodiments, the owner role mayonly be invoked when an administrator accesses organization directory201 through administrator console 950. In some embodiments, anadministrator can perform a limited set of owner actions when accessingorganization directory 201 through other access points thanadministrator console 950. For example, the administrator may be able tochange access permissions for a team-shared folder, but cannot delete ateam-shared folder when accessing organization directory 201 through anyaccess point other than administrator console.

An administrator can have a log-on-as-user access where theadministrator explicitly becomes a specific user account throughadministrator console 950. In this role, the administrator can accessthe specific user account and manage its user account collection.

FIG. 38A illustrates an example of administrator console 950 showingteam-shared folders 960 displayed under “team” page 954. In this page954 of administrator console 950 an administrator can access allteam-shared folders 960, and can change access permissions through editsto restrictive access control list 147, can create new team-sharedfolders using button 952, and can archive team-shared folders (addressedbelow).

In some embodiments, prior to accessing team page 954 of administratorconsole 950, the administrator must escalate their permissions to “teamowner” level. In some embodiments permission escalation can be achievedthrough authorization service 132 as addressed with respect to FIG. 4 .Client device 150, being operated by the administrator, can requestaccess to all team-shared folders in organization directory in the viewcontext of administrator console 950. In some embodiments, theadministrator can be prompted with a message in administrator console950 confirming that the administrator wishes to escalate theirpermissions to “team owner” level.

FIG. 38B illustrates an example of administrator console 950 showinguser account folders 960 displayed under “member” page 956. On page 956of administrator console 950 an administrator can view all user accountsfolders 962, and can create new user account folders using button 952,but cannot access any such folders, or modify the folders withoutchanging their role from administrator to a user actor.

In some embodiments, when an administrator attempts to access a useraccount folder in administrator console 950, the administrator mustchange their role to user of the specific user account for the folderthe administrator wishes to access. In some embodiments the role changecan be achieved through authorization service 132 as addressed withrespect to FIG. 4 . Client device 150, being operated by theadministrator, can request access to a specific user account folder inorganization directory 201 in the view context of administrator console950. In some embodiments, as shown in FIG. 38C, the administrator can beprompted with message 964 in administrator console 950 asking if theadministrator wishes to sign in as the member.

FIG. 38B illustrates an example of administrator console 950 showingarchive page 958 and displaying archived folders 966. As addressedherein, one intent of organization directory 201 is to provide a singledirectory for all of an organization's content items, and this includescontent items that are no longer needed. An administrator can move afolder into the archive by removing all access to the folder, or byexplicitly moving a folder into the archive. Archived folders do notappear in any user account views; they are only accessible to anadministrator. Archived folders 966 can include user account folders foruser accounts that no longer have access to organization directory 201,or to team-shared folders that are no longer needed. In someembodiments, the administrator does not need any role change orprivilege escalation in order to access or restore an archived folder966.

In some embodiments, a folder can be archived by moving the folder intoan archive directory within or at least associated with organizationdirectory 201. The archive directory is hidden from all user accountshaving access to organization directory 201, and its existence andcontents can only be viewed within administrator console 950.

In some embodiments, when a team-shared folder is archived, a new filecan be written into or associated with the archived folder that recordsinformation from access control list 145 and restrictive access controllist 147 so that if the folder needs to be restored, or an administratorneeds to know previous user accounts with access, the information isstored with the archive.

In some embodiments, rather than making a separate request ofauthorization service 132 for privilege escalation, it can be possibleto request a maximum access level associated with the user account (oradministrator account) wherein the user account can elevate theirprivileges through explicit request, up to the maximum access providedby authorization service 132, but that that does not require anadditional request to authorization service 132.

In some embodiments administrator console 950 can also provide aninformational view. The informational view can present variousstatistics relevant in managing organization directory 201. For example,the informational view can provide information regarding a number ofusers having access to organization directory 201, storage spaceutilized or available, license information, statistics regarding fileactivity within organization directory 201, etc. In some embodiments theinformational view is accessible by any administrator, and does notrequire further elevated privileges.

In some embodiments administrator console 950 can also provide a searchfunction to allow administrators to search for content items withinorganization directory 201. In some embodiments the search function isaccessible by any administrator, and does not require further elevatedprivileges.

FIG. 39 shows an example of computing system 1000, which can be forexample any computing device making up client device 150, contentmanagement system 110 or any component thereof in which the componentsof the system are in communication with each other using connection1005. Connection 1005 can be a physical connection via a bus, or adirect connection into processor 1010, such as in a chipsetarchitecture. Connection 1005 can also be a virtual connection,networked connection, or logical connection.

In some embodiments computing system 1000 is a distributed system inwhich the functions described in this disclosure can be distributedwithin a datacenter, multiple datacenters, a peer network, etc. In someembodiments, one or more of the described system components representsmany such components each performing some or all of the function forwhich the component is described. In some embodiments, the componentscan be physical or virtual devices.

Example system 1000 includes at least one processing unit (CPU orprocessor) 1010 and connection 1005 that couples various systemcomponents including system memory 1015, such as read only memory (ROM)1020 and random access memory (RAM) 1025 to processor 1010. Computingsystem 1000 can include a cache of high-speed memory 1012 connecteddirectly with, in close proximity to, or integrated as part of processor1010.

Processor 1010 can include any general purpose processor and a hardwareservice or software service, such as services 1032, 1034, and 1036stored in storage device 1030, configured to control processor 1010 aswell as a special-purpose processor where software instructions areincorporated into the actual processor design. Processor 1010 mayessentially be a completely self-contained computing system, containingmultiple cores or processors, a bus, memory controller, cache, etc. Amulti-core processor may be symmetric or asymmetric.

To enable user interaction, computing system 1000 includes an inputdevice 1045, which can represent any number of input mechanisms, such asa microphone for speech, a touch-sensitive screen for gesture orgraphical input, keyboard, mouse, motion input, speech, etc. Computingsystem 1000 can also include output device 1035, which can be one ormore of a number of output mechanisms known to those of skill in theart. In some instances, multimodal systems can enable a user to providemultiple types of input/output to communicate with computing system1000. Computing system 1000 can include communications interface 1040,which can generally govern and manage the user input and system output.There is no restriction on operating on any particular hardwarearrangement and therefore the basic features here may easily besubstituted for improved hardware or firmware arrangements as they aredeveloped.

Storage device 1030 can be a non-volatile memory device and can be ahard disk or other types of computer readable media which can store datathat are accessible by a computer, such as magnetic cassettes, flashmemory cards, solid state memory devices, digital versatile disks,cartridges, random access memories (RAMs), read only memory (ROM),and/or some combination of these devices.

The storage device 1030 can include software services, servers,services, etc., that when the code that defines such software isexecuted by the processor 1010, it causes the system to perform afunction. In some embodiments, a hardware service that performs aparticular function can include the software component stored in acomputer-readable medium in connection with the necessary hardwarecomponents, such as processor 1010, connection 1005, output device 1035,etc., to carry out the function.

For clarity of explanation, in some instances the present technology maybe presented as including individual functional blocks includingfunctional blocks comprising devices, device components, steps orroutines in a method embodied in software, or combinations of hardwareand software.

Any of the steps, operations, functions, or processes described hereinmay be performed or implemented by a combination of hardware andsoftware services or services, alone or in combination with otherdevices. In some embodiments, a service can be software that resides inmemory of a client device and/or one or more servers of a contentmanagement system and perform one or more functions when a processorexecutes the software associated with the service. In some embodiments,a service is a program, or a collection of programs that carry out aspecific function. In some embodiments, a service can be considered aserver. The memory can be a non-transitory computer-readable medium.

In some embodiments the computer-readable storage devices, mediums, andmemories can include a cable or wireless signal containing a bit streamand the like. However, when mentioned, non-transitory computer-readablestorage media expressly exclude media such as energy, carrier signals,electromagnetic waves, and signals per se.

Methods according to the above-described examples can be implementedusing computer-executable instructions that are stored or otherwiseavailable from computer readable media. Such instructions can comprise,for example, instructions and data which cause or otherwise configure ageneral purpose computer, special purpose computer, or special purposeprocessing device to perform a certain function or group of functions.Portions of computer resources used can be accessible over a network.The computer executable instructions may be, for example, binaries,intermediate format instructions such as assembly language, firmware, orsource code. Examples of computer-readable media that may be used tostore instructions, information used, and/or information created duringmethods according to described examples include magnetic or opticaldisks, solid state memory devices, flash memory, USB devices providedwith non-volatile memory, networked storage devices, and so on.

Devices implementing methods according to these disclosures can comprisehardware, firmware and/or software, and can take any of a variety ofform factors. Typical examples of such form factors include servers,laptops, smart phones, small form factor personal computers, personaldigital assistants, and so on. Functionality described herein also canbe embodied in peripherals or add-in cards. Such functionality can alsobe implemented on a circuit board among different chips or differentprocesses executing in a single device, by way of further example.

The instructions, media for conveying such instructions, computingresources for executing them, and other structures for supporting suchcomputing resources are means for providing the functions described inthese disclosures.

Although a variety of examples and other information was used to explainaspects within the scope of the appended claims, no limitation of theclaims should be implied based on particular features or arrangements insuch examples, as one of ordinary skill would be able to use theseexamples to derive a wide variety of implementations. Further andalthough some subject matter may have been described in languagespecific to examples of structural features and/or method steps, it isto be understood that the subject matter defined in the appended claimsis not necessarily limited to these described features or acts. Forexample, such functionality can be distributed differently or performedin components other than those identified herein. Rather, the describedfeatures and steps are disclosed as examples of components of systemsand methods within the scope of the appended claims.

What is claimed is:
 1. A method comprising: retrieving a path for afolder associated with an access change, wherein the access changepertains to a user account gaining access to the folder; in response tothe retrieval, identifying access rights to a superordinate foldersuperordinate to the folder in the path; determining the superordinatefolder was not accessible by the user account prior to the user accountgaining access to the folder; and in response to the determination,adding, in a traversal dictionary, the path to the superordinate folder,wherein adding the path in the traversal dictionary gives the useraccount a traversal right to the superordinate folder, wherein thetraversal right allows the user account to view the superordinate folderto access the folder, wherein the superordinate folder further comprisesother content items that are visible to another user account but notvisible to the user account with the traversal right.
 2. The method ofclaim 1, wherein the adding the path to the superordinate folder in thetraversal dictionary is for an organization directory, wherein useraccounts associated with the organization directory, including the useraccount, access content items by same respective paths in theorganization directory.
 3. The method of claim 1, wherein the traversaldictionary is stored in association with each folder in a respectivepath for which access to at least one folder is a traversal right, andlists a next subordinate folder for which the user account has traversalrights.
 4. The method of claim 1, further comprising: identifying accessrights to a next superordinate folder that is superordinate to thesuperordinate folder; determining that the next superordinate folder wasnot accessible by the user account prior to the user account gainingaccess to the folder; and when the next superordinate folder wasinaccessible by the user account prior to the user account gainingaccess to the folder, adding, in the traversal dictionary, a path to thenext superordinate folder.
 5. The method of claim 1, wherein thedetermining that the superordinate folder was not accessible by the useraccount prior to the user account gaining access to the folder includes:determining that the user account is not listed in a restrictive accesscontrol list for the superordinate folder.
 6. The method of claim 1,further comprising: prior to the retrieving the path for the folder,receiving a request to access the folder by the user account; anddetermining whether the user account has traversal rights to access thefolder based on the traversal dictionary.
 7. The method of claim 6,further comprising: determining whether the folder is a team-sharedfolder where user accounts associated with an organization directoryhave rights to at least view a name of the team-shared folder.
 8. Themethod of claim 6, further comprising: sending, to a client deviceassociated with the user account, latest entries in a server filejournal for the folder and a cursor including a namespace identifier anda server file journal identifier for the latest entries in the serverfile journal.
 9. A non-transitory computer readable medium comprisinginstructions stored thereon, when executed the instructions areeffective to cause a content management system to: retrieve a path for afolder associated with an access change, wherein the access changepertains to a user account gaining access to the folder; in response tothe retrieval, identify access rights to a superordinate foldersuperordinate to the folder in the path; determine the superordinatefolder was not accessible by the user account prior to the user accountgaining access to the folder; and in response to the determination, add,in a traversal dictionary, the path to the superordinate folder, whereinadding the path in the traversal dictionary gives the user account atraversal right to the superordinate folder, wherein the traversal rightallows the user account to view the superordinate folder to access thefolder, wherein the superordinate folder further comprises other contentitems that are visible to another user account but not visible to theuser account with the traversal right.
 10. The non-transitory computerreadable medium of claim 9, wherein the adding the path to thesuperordinate folder in the traversal dictionary is for an organizationdirectory, wherein user accounts associated with the organizationdirectory, including the user account, access content items by samerespective paths in the organization directory.
 11. The non-transitorycomputer readable medium of claim 9, wherein the traversal dictionary isstored in association with each folder in a respective path for whichaccess to at least one folder is a traversal right, and lists a nextsubordinate folder for which the user account has traversal rights. 12.The non-transitory computer readable medium of claim 9, comprisinginstructions to cause the content management system to: identify accessrights to a next superordinate folder that is superordinate to thesuperordinate folder; determine that the next superordinate folder wasnot accessible by the user account prior to the user account gainingaccess to the folder; and when the next superordinate folder wasinaccessible by the user account prior to the user account gainingaccess to the folder, add, in the traversal dictionary, a path to thenext superordinate folder.
 13. The non-transitory computer readablemedium of claim 9, comprising instructions to cause the contentmanagement system to: determine that the user account is not listed in arestrictive access control list for the superordinate folder.
 14. Thenon-transitory computer readable medium of claim 9, comprisinginstructions to cause the content management system to: prior to theretrieving the path for the folder, receive a request to access thefolder by the user account; and determine whether the user account hastraversal rights to access the folder based on the traversal dictionary.15. The non-transitory computer readable medium of claim 14, comprisinginstructions to cause the content management system to: determinewhether the folder is a team-shared folder where user accountsassociated with an organization directory have rights to at least view aname of the team-shared folder.
 16. The non-transitory computer readablemedium of claim 14, comprising instructions to cause the contentmanagement system to: send, to a client device associated with the useraccount, latest entries in a server file journal for the folder and acursor including a namespace identifier and a server file journalidentifier for the latest entries in the server file journal.
 17. Acontent management system comprising: one or more processors; and atleast one memory having instructions stored thereon, that when executedthe instructions are effective to cause the one or more processors to:retrieve a path for a folder associated with an access change, whereinthe access change pertains to a user account gaining access to thefolder; in response to the retrieval, identify access rights to asuperordinate folder superordinate to the folder in the path; determinethe superordinate folder was not accessible by the user account prior tothe user account gaining access to the folder; and in response to thedetermination, add, in a traversal dictionary, the path to thesuperordinate folder, wherein adding the path in the traversaldictionary gives the user account a traversal right to the superordinatefolder, wherein the traversal right allows the user account to view thesuperordinate folder to access the folder, wherein the superordinatefolder further comprises other content items that are visible to anotheruser account but not visible to the user account with the traversalright.
 18. The content management system of claim 17, wherein the addingthe path to the superordinate folder in the traversal dictionary is foran organization directory, wherein user accounts associated with theorganization directory, including the user account, access content itemsby same respective paths in the organization directory.
 19. The contentmanagement system of claim 17, wherein the traversal dictionary isstored in association with each folder in a respective path for whichaccess to at least one folder is a traversal right, and lists a nextsubordinate folder for which the user account has traversal rights. 20.The content management system of claim 17, comprising instructions tocause the one or more processors to: identify access rights to a nextsuperordinate folder that is superordinate to the superordinate folder;determine that the next superordinate folder was not accessible by theuser account prior to the user account gaining access to the folder; andwhen the next superordinate folder was inaccessible by the user accountprior to the user account gaining access to the folder, add, in thetraversal dictionary, a path to the next superordinate folder.